aggrStrata2 {SamplingStrata}R Documentation

Builds the "strata" dataframe containing information on target variables Y's distributions in the different strata, starting from a frame

Description

This function builds the dataframe "strata" considering as input a given domain in the sampling frame. In case a dataframe "model" is given, the anticipated variance in the strata for each target variable is calculated

Usage

aggrStrata2(dataset, 
            model=NULL, 
            vett,
            dominio)

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

model

Dataframe with the parameters of the model(s) to be used to calculate anticipated variance. Default is null.

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.

Value

A dataframe containing strata

Author(s)

Giulio Barcaroli

Examples

## Not run: 
strata <- aggrStrata2(dataset=frame,
                      model=NULL,
                      vett,
                      dominio=1)

## End(Not run)

[Package SamplingStrata version 1.5-4 Index]