This function allows to build the information regarding the sampling frame of the population of reference. Mandatory variables are: (i) the name of the dataset containing the sampling frame of the population of reference (ii) an identifier (Id) (iii) a set of auxiliary variables X (iv) a set of target variables Y (v) the indicator of the domain to which the unit belongs

buildFrameDF(df, id, X, Y, domainvalue)

Arguments

df

This is the name of the dataframe containing the information on all the units in population of reference.

id

This is the name of the identifier in the sampling frame.

X

A character vector containing the names of the auxiliary variables in the frame dataset

Y

A character vector containing the names of the target variables in the frame dataset

domainvalue

The name of the variable in the frame dataset that contains the indication of the domains to which the units belong.

Value

A dataframe

Author

Giulio Barcaroli

Examples

if (FALSE) { data(swissmunicipalities) id = "Nom" X = c("Surfacesbois","Surfacescult") Y = c("Pop020","Pop2040") domainvalue = "REG" frame <- buildFrameDF(swissmunicipalities,id,X,Y,domainvalue) head(frame) }