sandwich.model: Perform Sandwich model-based mapping

View source: R/sandwich.model.r

sandwich.modelR Documentation

Perform Sandwich model-based mapping

Description

Estimate the mean and standard error for each reporting unit using SSH-based spatial prediction.

Usage

sandwich.model(object,
       sampling.attr,
       type="shp",
       ssh.id.col=NULL,
       ssh.weights=NULL)

Arguments

object

When type="shp", object is a list of three sf objects generated by load.data.shp, including a point sf object used as the sampling layer, a polygon sf object used as the SSH layer, and a polygon sf object used as the SSH layer. When type="txt", object is a list of two data frames generated by load.data.txt, including a file linking sampling and SSH layers and a file linking reporting and SSH layers.

sampling.attr

Text for the name of the attribute to be predicted in the sampling layer.

type

Text for the type of input data. type="shp" denotes shapefiles, and type="txt" denotes text files. By default, type="shp".

ssh.id.col

Text for the column that specifies which stratum each sampling unit falls into (see load.data.txt). Set to NULL when type="shp".

ssh.weights

A list that specifies the strata in the SSH layer and their corresponding columns of weights in reporting_ssh.file (see load.data.txt).

Value

A sandwich.ci object that contains the estimated mean and standard deviation for each reporting unit.

References

Wang, J. F., Haining, R., Liu, T. J., Li, L. F., & Jiang, C. S. (2013). Sandwich estimation for multi-unit reporting on a stratified heterogeneous surface. Environment and Planning A, 45(10), 2515-2534.

See Also

load.data.shp, load.data.txt

Examples

data(sim.data)
sim.sw <- sandwich.model(object=sim.data, sampling.attr="Value", type="shp")


sandwichr documentation built on April 27, 2023, 1:10 a.m.