bootSurveyDesign: Generate replicate weights for complex survey designs.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/bootSurveyDesign.R

Description

This function creates a survey.design object using the survey package, then uses resampling to generate sample weights.

Usage

1
2
3
4
5
6
7
8
bootSurveyDesign(
  survey.dat = NULL,
  id.var = NULL,
  strata.var = NULL,
  weight.var = NULL,
  nested.clusters = TRUE,
  n.boot = 1000
)

Arguments

survey.dat

A data.frame containing survey data. Defaults to NULL.

id.var

A string containing the name of the variable that denotes clusters of primary sampling units. Defaults to NULL.

strata.var

A string containing the name of the variable that stratifies the PSUs. Defaults to NULL.

weight.var

A string containing the name of the variable containing sampling weights. Defaults to NULL.

nested.clusters

Are the clusters nested within strata? Defaults to TRUE.

n.boot

The number of replications to perform. Defaults to 1000.

Value

An object of class svyrep.design containing replicate weights.

Author(s)

Jack Leary

See Also

svydesign as.svrepdesign

Examples

1
## Not run: bootSurveyDesign(survey.dat = nhanes_data, id.var = "CLUST_ID", strata.var = "STRATUM", weight.var = "SAMPLE_WEIGHT")

jr-leary7/SurveyQuantReg documentation built on Dec. 21, 2021, 3:14 a.m.