A survey design object for two-phase (double) sampling. Create with
as_survey_twophase().
Usage
survey_twophase(
data = data.frame(),
metadata = survey_metadata(),
variables = list(),
groups = character(0),
call = NULL
)Arguments
- data
A
data.framecontaining the survey data (all Phase 1 rows, with a logical indicator for Phase 2 membership). Preferas_survey_twophase()over calling this constructor directly.- metadata
A survey_metadata object. Inherited from the Phase 1 design when using
as_survey_twophase().- variables
A named list of design specification (phase1, phase2, subset, method). Set automatically by
as_survey_twophase().- groups
Set by surveytidy's
group_by(). Alwayscharacter(0)in standalone surveycore use.- call
Language object capturing the construction call.
Design variables (@variables)
phase1Named list containing the Phase 1 design specification (from a
survey_taylorobject's@variables).phase2Named list with optional Phase 2 design columns:
ids,strata,probs,fpc— eachNULLor a character vector of column names.subsetCharacter string naming the logical column that indicates Phase 2 membership (
TRUE= selected into Phase 2).method"full","approx", or"simple".
See also
as_survey_twophase() to create a survey_twophase object.
Other constructors:
as_survey(),
as_survey_calibrated(),
as_survey_rep(),
as_survey_srs(),
as_survey_twophase(),
survey_calibrated(),
survey_data(),
survey_replicate(),
survey_srs(),
survey_taylor()