Description Usage Arguments Value Author(s) See Also Examples
View source: R/bootSurveyDesign.R
This function creates a survey.design
object using the survey
package, then uses resampling to generate sample weights.
1 2 3 4 5 6 7 8 |
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. |
An object of class svyrep.design
containing replicate weights.
Jack Leary
1 | ## Not run: bootSurveyDesign(survey.dat = nhanes_data, id.var = "CLUST_ID", strata.var = "STRATUM", weight.var = "SAMPLE_WEIGHT")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.