A survey design object using replicate weights for variance estimation.
Create with as_survey_rep().
Usage
survey_replicate(
data = data.frame(),
metadata = survey_metadata(),
variables = list(),
groups = character(0),
call = NULL
)Arguments
- data
A
data.framecontaining the survey data. Preferas_survey_rep()over calling this constructor directly.- metadata
A survey_metadata object. Created automatically by
as_survey_rep().- variables
A named list of design specification (weights, repweights, type, scale, rscales, fpc, fpctype, mse). Set automatically by
as_survey_rep().- groups
Set by surveytidy's
group_by(). Alwayscharacter(0)in standalone surveycore use.- call
Language object capturing the construction call.
Design variables (@variables)
weightsCharacter string naming the weight column.
repweightsCharacter vector of replicate weight column names. The replicate weight matrix is computed on demand from
design@data[, design@variables$repweights]— it is not stored as a property.typeReplicate weight method: one of
"JK1","JK2","JKn","BRR","Fay","bootstrap","ACS","successive-difference", or"other".scaleNumeric scaling factor for variance estimation.
rscalesNumeric vector of replicate-specific scales, or
NULL.fpcFPC column name or
NULL.fpctype"fraction"or"correction".mseLogical. Use MSE estimates?
See also
as_survey_rep() to create a survey_replicate object.
Other constructors:
as_survey(),
as_survey_calibrated(),
as_survey_rep(),
as_survey_srs(),
as_survey_twophase(),
survey_calibrated(),
survey_data(),
survey_srs(),
survey_taylor(),
survey_twophase()