spacom: Spatially Weighted Context Data for Multilevel Modelling

Provides tools to construct and exploit spatially weighted context data. Spatial weights are derived by a Kernel function from a user-defined matrix of distances between contextual units. Spatial weights can then be applied either to precise contextual measures or to aggregate estimates based on micro-level survey data, to compute spatially weighted context data. Available aggregation functions include indicators of central tendency, dispersion, or inter-group variability, and take into account survey design weights. The package further allows combining the resulting spatially weighted context data with individual-level predictor and outcome variables, for the purposes of multilevel modelling. An ad hoc stratified bootstrap resampling procedure generates robust point estimates for multilevel regression coefficients and model fit indicators, and computes confidence intervals adjusted for measurement dependency and measurement error of aggregate estimates. As an additional feature, residual and explained spatial dependency can be estimated for the tested models.

AuthorTill Junge [aut, cre], Sandra Penic [aut], Mathieu Cossuta [aut], Guy Elcheroth [aut], Stephanie Glaeser [ctb], Davide Morselli [ctb]
Date of publication2016-02-11 08:27:52
MaintainerTill Junge <>
LicenseGPL (>= 2)

View on CRAN


AIC,MLSpawExactOutput-method Man page
BIC,MLSpawExactOutput-method Man page
CH1903 Man page
d_ethnic Man page
d_geo Man page
d_ident Man page
d_migr Man page
ExploreMLSpawAggregate Man page
ExploreMLSpawExact Man page
fixef,MLSpawExactOutput-method Man page
getSample,SpawAggregateOutput-method Man page
GPS Man page
homog_census Man page
length,MultiKeyHash-method Man page
length,SpawAggregateOutput-method Man page
merge,SpawAggregateOutput,SpawAggregateOutput-method Man page
MLSpawExact Man page
MLSpawExactOutput-class Man page
MLSpawResidMoran Man page
[<-,MultiKeyHash,ANY,ANY,ANY-method Man page
[,MultiKeyHash,ANY,ANY,ANY-method Man page
[[<-,MultiKeyHash,ANY,ANY-method Man page
[[,MultiKeyHash,ANY,ANY-method Man page
MultiKeyHash-class Man page
names<-,SpawAggregateOutput,ANY-method Man page
names<-,SpawAggregateOutput-method Man page
names,SpawAggregateOutput-method Man page
print,MLSpawExactOutput-method Man page
print,ResampleMLSpawOutput-method Man page
ranef,MLSpawExactOutput-method Man page
ResampleMLSpawAggregate Man page
ResampleMLSpawExact Man page
ResampleMLSpawOutput-class Man page
show,MLSpawExactOutput-method Man page
show,ResampleMLSpawOutput-method Man page
show,SpawAggregateOutput-method Man page
spacom Man page
spacom-package Man page
SpawAggregate Man page
[,SpawAggregateOutput,ANY,ANY,ANY-method Man page
SpawAggregateOutput-class Man page
SpawExact Man page
summary,MLSpawExactOutput-method Man page
traces_event Man page
traces_ind Man page
VarCorr,MLSpawExactOutput-method Man page
WeightMatrix Man page
wt.Atkinson Man page
wt.gini Man page
wt.gini.categ Man page Man page
wt.mean Man page
wt.RS Man page Man page
wt.Theil Man page
wt.var Man page

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.