Skip to contents

A simulation data set for testing use of spatial hierarchical structure and samples overlapping on certain locations.

Usage

data(mulsam.test)

Format

A list of three items called "data", "coords" and "beta". Item "data" is a data frame with 873 observations at 25 locations and the following 6 variables.

y

a numeric vector, dependent variable \(y\)

g1

a numeric vector, group level independent variable \(g_1\)

g2

a numeric vector, group level independent variable \(g_2\)

z1

a numeric vector, sample level independent variable \(z_1\)

x1

a numeric vector, sample level independent variable \(x_1\)

group

a numeric vector, group id of each sample

where g1 and g2 are used to estimate local fixed effects; x1 is used to estimate global fixed effects and z1 is used to estimate random effects.

Author

Yigong Hu yigong.hu@bristol.ac.uk

Examples

data(mulsam.test)
hgwr(formula = y ~ L(g1 + g2) + x1 + (z1 | group),
     data = mulsam.test$data,
     coords = mulsam.test$coords,
     bw = 10, kernel = "bisquared")
#> Hierarchical and geographically weighted regression model
#> =========================================================
#> Formula: y ~ L(g1 + g2) + x1 + (z1 | group)
#>  Method: Back-fitting and Maximum likelihood
#>    Data: mulsam.test$data
#> 
#> Fixed Effects
#> -------------
#>  Intercept        x1 
#>   1.780635  1.967851 
#> 
#> Group-level Spatially Weighted Effects
#> --------------------------------------
#> Bandwidth: 10 (nearest neighbours)
#> 
#> Coefficient estimates:
#>  Coefficient        Min  1st Quartile     Median  3rd Quartile       Max 
#>    Intercept  -0.796101     -0.612570  -0.267630      0.301641  0.754773 
#>           g1  -0.084653      1.534803   1.711127      2.694849  6.206580 
#>           g2   0.687552      0.871403   1.827057      2.353679  4.074047 
#> 
#> Sample-level Random Effects
#> ---------------------------
#>    Groups       Name  Std.Dev.      Corr 
#>     group  Intercept  1.030520           
#>                   z1  1.030520  0.000000 
#>  Residual             1.030520           
#> 
#> Other Information
#> -----------------
#> Number of Obs: 873
#>        Groups: group , 25