Skip to contents

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.frame containing the survey data. Prefer as_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(). Always character(0) in standalone surveycore use.

call

Language object capturing the construction call.

Value

A survey_replicate object.

Design variables (@variables)

weights

Character string naming the weight column.

repweights

Character 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.

type

Replicate weight method: one of "JK1", "JK2", "JKn", "BRR", "Fay", "bootstrap", "ACS", "successive-difference", or "other".

scale

Numeric scaling factor for variance estimation.

rscales

Numeric vector of replicate-specific scales, or NULL.

fpc

FPC column name or NULL.

fpctype

"fraction" or "correction".

mse

Logical. Use MSE estimates?