Package: svrep 0.6.4.9000

svrep: Tools for Creating, Updating, and Analyzing Survey Replicate Weights

Provides tools for creating and working with survey replicate weights, extending functionality of the 'survey' package from Lumley (2004) <doi:10.18637/jss.v009.i08>. Implements bootstrap methods for complex surveys, including the generalized survey bootstrap as described by Beaumont and Patak (2012) <doi:10.1111/j.1751-5823.2011.00166.x>. Methods are provided for applying nonresponse adjustments to both full-sample and replicate weights as described by Rust and Rao (1996) <doi:10.1177/096228029600500305>. Implements methods for sample-based calibration described by Opsomer and Erciulescu (2021) <https://www150.statcan.gc.ca/n1/pub/12-001-x/2021002/article/00006-eng.htm>. Diagnostic functions are included to compare weights and weighted estimates from different sets of replicate weights.

Authors:Ben Schneider [aut, cre]

svrep_0.6.4.9000.tar.gz
svrep_0.6.4.9000.zip(r-4.5)svrep_0.6.4.9000.zip(r-4.4)svrep_0.6.4.9000.zip(r-4.3)
svrep_0.6.4.9000.tgz(r-4.4-any)svrep_0.6.4.9000.tgz(r-4.3-any)
svrep_0.6.4.9000.tar.gz(r-4.5-noble)svrep_0.6.4.9000.tar.gz(r-4.4-noble)
svrep_0.6.4.9000.tgz(r-4.4-emscripten)svrep_0.6.4.9000.tgz(r-4.3-emscripten)
svrep.pdf |svrep.html
svrep/json (API)
NEWS

# Install 'svrep' in R:
install.packages('svrep', repos = c('https://bschneidr.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bschneidr/svrep/issues

Datasets:

On CRAN:

25 exports 7 stars 2.43 score 11 dependencies 3 dependents 64 scripts 1.1k downloads

Last updated 5 days agofrom:240293b37a. Checks:OK: 5 ERROR: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 13 2024
R-4.5-winOKSep 13 2024
R-4.5-linuxOKSep 13 2024
R-4.4-winOKSep 13 2024
R-4.4-macOKSep 13 2024
R-4.3-winERRORSep 13 2024
R-4.3-macERRORSep 13 2024

Exports:add_inactive_replicatesas_bootstrap_designas_data_frame_with_weightsas_fays_gen_rep_designas_gen_boot_designas_random_group_jackknife_designcalibrate_to_estimatecalibrate_to_sampleestimate_boot_reps_for_target_cvestimate_boot_sim_cvget_design_quad_formget_nearest_psd_matrixis_psd_matrixmake_fays_gen_rep_factorsmake_gen_boot_factorsmake_quad_form_matrixmake_rwyb_bootstrap_weightsmake_twophase_quad_formredistribute_weightsrescale_repsshuffle_replicatesstack_replicate_designssubsample_replicatessummarize_rep_weightssvyby_repwts

Dependencies:DBIlatticeMatrixminqamitoolsmvtnormnumDerivRcppRcppArmadillosurveysurvival

Bootstrap Methods for Surveys

Rendered frombootstrap-replicates.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2023-09-08
Started: 2022-12-11

Calibrating to Estimated Control Totals

Rendered fromsample-based-calibration.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2023-02-05
Started: 2022-05-12

Nonresponse Adjustments

Rendered fromnonresponse-adjustments.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2023-05-31
Started: 2022-06-27

Replication Methods for Two-phase Sampling

Rendered fromtwo-phase-sampling.Rmdusingknitr::rmarkdownon Sep 13 2024.

Last update: 2023-08-28
Started: 2023-02-05

Readme and manuals

Help Manual

Help pageTopics
Add inactive replicates to a survey design objectadd_inactive_replicates
Convert a survey design object to a bootstrap replicate designas_bootstrap_design
Convert a survey design object to a data frame with weights stored as columnsas_data_frame_with_weights
Convert a survey design object to a replication design using Fay's generalized replication methodas_fays_gen_rep_design
Convert a survey design object to a generalized bootstrap replicate designas_gen_boot_design
Convert a survey design object to a random-groups jackknife designas_random_group_jackknife_design
Calibrate weights from a primary survey to estimated totals from a control survey, with replicate-weight adjustments that account for variance of the control totalscalibrate_to_estimate
Calibrate weights from a primary survey to estimated totals from a control survey, with replicate-weight adjustments that account for variance of the control totalscalibrate_to_sample
Estimate the number of bootstrap replicates needed to reduce the bootstrap simulation error to a target levelestimate_boot_reps_for_target_cv
Estimate the bootstrap simulation errorestimate_boot_sim_cv
Determine the quadratic form matrix of a variance estimator for a survey design objectget_design_quad_form
Approximates a symmetric, real matrix by the nearest positive semidefinite matrix.get_nearest_psd_matrix
Check whether a matrix is positive semidefiniteis_psd_matrix
Public Libraries Survey (PLS): A Census of U.S. Public Libraries in FY2020libraries library_census library_multistage_sample library_stsys_sample
ACS PUMS Data for Louisvillelou_pums_microdata
Louisville Vaccination Surveylou_vax_survey
Control totals for the Louisville Vaccination Surveylou_vax_survey_control_totals
Form replication factors using Fay's generalized replication methodmake_fays_gen_rep_factors
Creates replicate factors for the generalized survey bootstrapmake_gen_boot_factors
Represent a variance estimator as a quadratic formmake_quad_form_matrix
Create bootstrap replicate weights for a general survey design, using the Rao-Wu-Yue-Beaumont bootstrap methodmake_rwyb_bootstrap_weights
Combine quadratic forms from each phase of a two phase designmake_twophase_quad_form
Redistribute weight from one group to anotherredistribute_weights
Rescale replicate factorsrescale_reps
Shuffle the order of replicates in a survey design objectshuffle_replicates
Stack replicate designs, combining data and weights into a single objectstack_replicate_designs
Retain only a random subset of the replicates in a designsubsample_replicates
Summarize the replicate weightssummarize_rep_weights
Compare survey statistics calculated separately from different sets of replicate weightssvyby_repwts
Variance Estimatorsvariance-estimators