Learn R Programming

SamplingStrata (version 1.5-4)

aggrStrataSpatial: Builds the "strata" dataframe containing information on target variables Y's distributions in the different strata, starting from a frame where units are spatially correlated.

Description

This function builds the dataframe "strata" considering as input a given domain in the sampling frame. The variance in each stratum is calculated by considering also the component of spatial autocorrelation.

Usage

aggrStrataSpatial(dataset,
            fitting,
            range,
            kappa, 
            vett, 
            dominio)

Value

A dataframe containing strata

Arguments

dataset

This is the name of the dataframe containing the sample data, or the frame data. It is strictly required that auxiliary information is organised in variables named as X1, X2, ... , Xm (there should be at least one of them) and the target variables are denoted by Y1, Y2, ... , Yn. In addition, in case of sample data, a variable named 'WEIGHT' must be present in the dataframe, containing the weigths associated to each sampling unit

fitting

Fitting of the model(s). Default is 1.

range

Maximum range for spatial autocorrelation

kappa

Factor used in evaluating spatial autocorrelation. Default is 3.

vett

vector of values indicating how the units in the dataset must be aggregated in strata.

dominio

Value indicating the domain in the dataset to be processed.

Author

Giulio Barcaroli

Examples

Run this code
if (FALSE) {
strata <- aggrStrataSpatial(dataset=frame,
                            fitting=1,
                            range=800,
                            kappa=1)
}

Run the code above in your browser using DataLab