Summary an hgwrm object.
Usage
# S3 method for class 'hgwrm'
summary(object, ..., test_hetero = FALSE, verbose = 0)Arguments
- object
An
hgwrmobject returned fromhgwr().- ...
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 toTRUE, 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.
diagnosticA list of diagnostic information.
random.stddevThe standard deviation of random effects.
random.corrThe correlation matrix of random effects.
residualsThe residual vector.
Details
The parameters used to perform test of spatial heterogeneity are
bwBandwidth (unit: number of nearest neighbours) used to make spatial kernel density estimation. Default:
10.polyThe number of polynomial terms used in the local polynomial estimation. Default:
2.resampleTotal resampling times. Default:
5000.kernelThe kernel function used in the local polynomial estimation. Options are
"gaussian"and"bisquared". Default:"bisquared".
Examples
data(mulsam.test)
m <- hgwr(
formula = y ~ L(g1 + g2) + x1 + (z1 | group),
data = mulsam.test$data,
coords = mulsam.test$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: mulsam.test$data
#>
#> Parameter Estimates
#> -------------------
#> Fixed effects:
#> Estimated Sd. Err t.val Pr(>|t|)
#> Intercept 1.852190 0.203079 9.120541 0.000000 ***
#> x1 1.967644 0.033827 58.168539 0.000000 ***
#>
#> Bandwidth: 10 (nearest neighbours)
#>
#> GLSW effects:
#> Mean Est. Mean Sd. *** ** * .
#> Intercept -0.208441 0.247059 0.0% 0.0% 4.0% 24.0%
#> g1 1.631474 1.795246 0.0% 0.0% 0.0% 0.0%
#> g2 1.430116 1.476570 0.0% 0.0% 0.0% 0.0%
#>
#> SLR effects:
#> Groups Name Mean Std.Dev. Corr
#> group Intercept 0.000000 1.033171
#> z1 1.869539 1.033171 0.000000
#> Residual 0.079964 1.033171
#>
#>
#> Diagnostics
#> -----------
#> rsquared 0.905207
#> logLik NaN
#> AIC NaN
#>
#> Scaled Residuals
#> ----------------
#> Min 1Q Median 3Q Max
#> -3.416380 -0.584726 0.092501 0.725766 3.028003
#>
#> Other Information
#> -----------------
#> Number of Obs: 873
#> Groups: group , 25
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: mulsam.test$data
#>
#> Parameter Estimates
#> -------------------
#> Fixed effects:
#> Estimated Sd. Err t.val Pr(>|t|)
#> Intercept 1.852190 0.203079 9.120541 0.000000 ***
#> x1 1.967644 0.033827 58.168539 0.000000 ***
#>
#> Bandwidth: 10 (nearest neighbours)
#>
#> GLSW effects:
#> Mean Est. Mean Sd. *** ** * .
#> Intercept -0.208441 0.247059 0.0% 0.0% 4.0% 24.0%
#> g1 1.631474 1.795246 0.0% 0.0% 0.0% 0.0%
#> g2 1.430116 1.476570 0.0% 0.0% 0.0% 0.0%
#>
#> SLR effects:
#> Groups Name Mean Std.Dev. Corr
#> group Intercept 0.000000 1.033171
#> z1 1.869539 1.033171 0.000000
#> Residual 0.079964 1.033171
#>
#>
#> Diagnostics
#> -----------
#> rsquared 0.905207
#> logLik NaN
#> AIC NaN
#>
#> Scaled Residuals
#> ----------------
#> Min 1Q Median 3Q Max
#> -3.416380 -0.584726 0.092501 0.725766 3.028003
#>
#> Other Information
#> -----------------
#> Number of Obs: 873
#> Groups: group , 25
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: mulsam.test$data
#>
#> Parameter Estimates
#> -------------------
#> Fixed effects:
#> Estimated Sd. Err t.val Pr(>|t|)
#> Intercept 1.852190 0.203079 9.120541 0.000000 ***
#> x1 1.967644 0.033827 58.168539 0.000000 ***
#>
#> Bandwidth: 10 (nearest neighbours)
#>
#> GLSW effects:
#> Mean Est. Mean Sd. *** ** * .
#> Intercept -0.208441 0.247059 0.0% 0.0% 4.0% 24.0%
#> g1 1.631474 1.795246 0.0% 0.0% 0.0% 0.0%
#> g2 1.430116 1.476570 0.0% 0.0% 0.0% 0.0%
#>
#> SLR effects:
#> Groups Name Mean Std.Dev. Corr
#> group Intercept 0.000000 1.033171
#> z1 1.869539 1.033171 0.000000
#> Residual 0.079964 1.033171
#>
#>
#> Diagnostics
#> -----------
#> rsquared 0.905207
#> logLik NaN
#> AIC NaN
#>
#> Scaled Residuals
#> ----------------
#> Min 1Q Median 3Q Max
#> -3.416380 -0.584726 0.092501 0.725766 3.028003
#>
#> Other Information
#> -----------------
#> Number of Obs: 873
#> Groups: group , 25