The function returns a dataframe, starting from the sampling frame (either universe or sample of a previous survey) with strata information.

prepareInputToAllocation_beat.1st(
  samp_frame,
  ID,
  stratum,
  dom,
  target,
  samp_weight = NULL
)

Arguments

samp_frame:

A dataframe with the sampling frame (either universe or sample of another survey).

ID:

name of the variable which is the identifier of the units in the sampling frame.

stratum:

either name of the variable in samp_frame which is taken as the stratum, or the name of the variables which have to be concatenated to obtain the stratum. In this last case, the variables used to build the stratum are retained..

dom:

name of the variable(s) in samp_frame which are the domain(s) of the estimates.

target:

variable(s) in samp_frame which is the target of the estimate.

samp_weight:

name of the variable in the sample of another survey specifying the sampling weights. Default is NULL, meaning that population is taken as the reference.

Value

A dataframe with strata information. The output dataframe can be used as input dataframe stratif for R2BEAT one-stage sample design (beat.1st)