Skip to contents

Summary an hgwrm object.

Usage

# S3 method for class 'hgwrm'
summary(object, ..., test_hetero = FALSE, verbose = 0)

Arguments

object

An hgwrm object returned from hgwr().

...

Other arguments passed from other functions.

test_hetero

Logical/list value. Whether to test the spatial heterogeneity of GLSW effects. If it is set to FALSE, the test will not be executed. If it is set to TRUE, the test will be executed with default parameters (see details below). It accepts a list to enable the test with specified parameters.

verbose

An Integer value to control whether additional messages during testing spatial heterogeneity should be reported.

Value

A list containing summary informations of this hgwrm object with the following fields.

diagnostic

A list of diagnostic information.

random.stddev

The standard deviation of random effects.

random.corr

The correlation matrix of random effects.

residuals

The residual vector.

Details

The parameters used to perform test of spatial heterogeneity are

bw

Bandwidth (unit: number of nearest neighbours) used to make spatial kernel density estimation. Default: 10.

poly

The number of polynomial terms used in the local polynomial estimation. Default: 2.

resample

Total resampling times. Default: 5000.

kernel

The kernel function used in the local polynomial estimation. Options are "gaussian" and "bisquared". Default: "bisquared".

See also

Examples

data(multisampling)
m <- hgwr(
 formula = y ~ L(g1 + g2) + x1 + (z1 | group),
 data = multisampling$data,
 coords = multisampling$coords,
 bw = 10
)
summary(m)
#> Hierarchical and geographically weighted regression model
#> =========================================================
#> Formula: y ~ L(g1 + g2) + x1 + (z1 | group)
#>  Method: Back-fitting and Maximum likelihood
#>    Data: multisampling$data
#> 
#> Parameter Estimates
#> -------------------
#> Fixed effects:
#>             Estimated   Sd. Err      t.val  Pr(>|t|)      
#>  Intercept   2.844509  0.254491  11.177234  0.000000  *** 
#>         x1   0.966059  0.046763  20.658467  0.000000  *** 
#> 
#> Bandwidth: 10 (nearest neighbours)
#> 
#> GLSW effects:
#>             Mean Est.  Mean Sd.   ***    **      *      . 
#>  Intercept  -1.115285  0.557561  0.0%  0.0%  56.2%  18.8% 
#>         g1   6.976060  3.208388  0.0%  6.2%  62.5%  31.2% 
#>         g2   0.663998  3.249016  0.0%  0.0%   0.0%   0.0% 
#> 
#> SLR effects:
#>    Groups       Name      Mean  Std.Dev.      Corr 
#>     group  Intercept  0.000000  1.921255           
#>                   z1  0.005422  1.921255  0.000000 
#>  Residual             0.233641  1.921255           
#>    Groups       Name      Mean  Std.Dev.      Corr 
#>     group  Intercept  0.000000  1.921255           
#>                   z1  0.005422  1.921255  0.000000 
#>  Residual             0.233641  1.921255           
#> 
#> 
#> Diagnostics
#> -----------
#>  rsquared  0.641698 
#>    logLik       NaN 
#>       AIC       NaN 
#> 
#> Scaled Residuals
#> ----------------
#>        Min         1Q    Median        3Q       Max 
#>  -5.222809  -0.982000  0.161400  1.480594  5.562956 
#> 
#> Other Information
#> -----------------
#> Number of Obs: 484
#>        Groups: group , 16
summary(m, test_hetero = TRUE)
#> Hierarchical and geographically weighted regression model
#> =========================================================
#> Formula: y ~ L(g1 + g2) + x1 + (z1 | group)
#>  Method: Back-fitting and Maximum likelihood
#>    Data: multisampling$data
#> 
#> Parameter Estimates
#> -------------------
#> Fixed effects:
#>             Estimated   Sd. Err      t.val  Pr(>|t|)      
#>  Intercept   2.844509  0.254491  11.177234  0.000000  *** 
#>         x1   0.966059  0.046763  20.658467  0.000000  *** 
#> 
#> Bandwidth: 10 (nearest neighbours)
#> 
#> GLSW effects:
#>             Mean Est.  Mean Sd.   ***    **      *      . 
#>  Intercept  -1.115285  0.557561  0.0%  0.0%  56.2%  18.8% 
#>         g1   6.976060  3.208388  0.0%  6.2%  62.5%  31.2% 
#>         g2   0.663998  3.249016  0.0%  0.0%   0.0%   0.0% 
#> 
#> GLSW effect spatial heterogeneity:
#>             Sd. Est.        t0    Min. t    Max. t  Pr(t>t0)      
#>  Intercept  0.241211  0.230216  0.035692  0.228627  0.000000  *** 
#>         g1  0.736901  0.716578  0.109344  0.694086  0.000000  *** 
#>         g2  0.645812  0.622871  0.118444  0.606161  0.000000  *** 
#> 
#> SLR effects:
#>    Groups       Name      Mean  Std.Dev.      Corr 
#>     group  Intercept  0.000000  1.921255           
#>                   z1  0.005422  1.921255  0.000000 
#>  Residual             0.233641  1.921255           
#>    Groups       Name      Mean  Std.Dev.      Corr 
#>     group  Intercept  0.000000  1.921255           
#>                   z1  0.005422  1.921255  0.000000 
#>  Residual             0.233641  1.921255           
#> 
#> 
#> Diagnostics
#> -----------
#>  rsquared  0.641698 
#>    logLik       NaN 
#>       AIC       NaN 
#> 
#> Scaled Residuals
#> ----------------
#>        Min         1Q    Median        3Q       Max 
#>  -5.222809  -0.982000  0.161400  1.480594  5.562956 
#> 
#> Other Information
#> -----------------
#> Number of Obs: 484
#>        Groups: group , 16
summary(m, test_hetero = list(kernel = "gaussian"))
#> Hierarchical and geographically weighted regression model
#> =========================================================
#> Formula: y ~ L(g1 + g2) + x1 + (z1 | group)
#>  Method: Back-fitting and Maximum likelihood
#>    Data: multisampling$data
#> 
#> Parameter Estimates
#> -------------------
#> Fixed effects:
#>             Estimated   Sd. Err      t.val  Pr(>|t|)      
#>  Intercept   2.844509  0.254491  11.177234  0.000000  *** 
#>         x1   0.966059  0.046763  20.658467  0.000000  *** 
#> 
#> Bandwidth: 10 (nearest neighbours)
#> 
#> GLSW effects:
#>             Mean Est.  Mean Sd.   ***    **      *      . 
#>  Intercept  -1.115285  0.557561  0.0%  0.0%  56.2%  18.8% 
#>         g1   6.976060  3.208388  0.0%  6.2%  62.5%  31.2% 
#>         g2   0.663998  3.249016  0.0%  0.0%   0.0%   0.0% 
#> 
#> GLSW effect spatial heterogeneity:
#>             Sd. Est.        t0    Min. t    Max. t  Pr(t>t0)      
#>  Intercept  0.241211  0.239693  0.127825  0.244467  0.002600   ** 
#>         g1  0.736901  0.732991  0.403952  0.738807  0.001000   ** 
#>         g2  0.645812  0.644046  0.352540  0.651728  0.000400  *** 
#> 
#> SLR effects:
#>    Groups       Name      Mean  Std.Dev.      Corr 
#>     group  Intercept  0.000000  1.921255           
#>                   z1  0.005422  1.921255  0.000000 
#>  Residual             0.233641  1.921255           
#>    Groups       Name      Mean  Std.Dev.      Corr 
#>     group  Intercept  0.000000  1.921255           
#>                   z1  0.005422  1.921255  0.000000 
#>  Residual             0.233641  1.921255           
#> 
#> 
#> Diagnostics
#> -----------
#>  rsquared  0.641698 
#>    logLik       NaN 
#>       AIC       NaN 
#> 
#> Scaled Residuals
#> ----------------
#>        Min         1Q    Median        3Q       Max 
#>  -5.222809  -0.982000  0.161400  1.480594  5.562956 
#> 
#> Other Information
#> -----------------
#> Number of Obs: 484
#>        Groups: group , 16