R: Analysis of Complex Survey Samples

# Analysis of Complex Survey Samples

## Documentation for package ‘survey’ version 4.4-2

- DESCRIPTION file.
- User guides, package vignettes and other documentation.
- Package NEWS.

## Help Pages

A B C D E F G H I J L M N O P Q R S T U V W X Y misc

## -- A --

AIC.svycoxph | Survey-weighted Cox models.
AIC.svyglm | Model comparison for glms.
anova.svycoxph | Model comparison for glms.
anova.svyglm | Model comparison for glms.
anova.svyloglin | Loglinear models
api | Student performance in California schools
apiclus1 | Student performance in California schools
apiclus2 | Student performance in California schools
apipop | Student performance in California schools
apisrs | Student performance in California schools
apistrat | Student performance in California schools
as.fpc | Package sample and population size data
as.matrix.repweights | Compress replicate weight matrix
as.matrix.repweights_compressed | Compress replicate weight matrix
as.svrepdesign | Convert a survey design to use replicate weights
as.svrepdesign.default | Convert a survey design to use replicate weights
as.svrepdesign.svyimputationList | Convert a survey design to use replicate weights
as.svydesign2 | Update to the new survey design format
as.vector.repweights_compressed | Compress replicate weight matrix

## -- B --

barplot.svrepstat | Barplots and Dotplots
barplot.svyby | Barplots and Dotplots
barplot.svystat | Barplots and Dotplots
BIC.svyglm | Model comparison for glms.
biplot.svyprcomp | Sampling-weighted principal component analysis
bootstratum | Compute survey bootstrap weights
bootweights | Compute survey bootstrap weights
brrweights | Compute replicate weights

## -- C --

cal.linear | Calibration metrics
cal.logit | Calibration metrics
cal.raking | Calibration metrics
cal.sinh | Calibration metrics
calibrate | Calibration (GREG) estimators
calibrate.survey.design2 | Calibration (GREG) estimators
calibrate.svyrep.design | Calibration (GREG) estimators
calibrate.twophase | Calibration (GREG) estimators
cal_names | Calibration (GREG) estimators
close.DBIsvydesign | Open and close DBI connections
coef.svrepstat | Summary statistics for sample surveys
coef.svyby | Survey statistics on subsets
coef.svyglm | Survey-weighted generalised linear models.
coef.svyloglin | Loglinear models
coef.svymle | Maximum pseudolikelihood estimation in complex surveys
coef.svyratio | Ratio estimation
coef.svystat | Summary statistics for sample surveys
compressWeights | Compress replicate weight matrix
compressWeights.default | Compress replicate weight matrix
compressWeights.repweights_compressed | Compress replicate weight matrix
compressWeights.svyrep.design | Compress replicate weight matrix
confint.svrepstat | Summary statistics for sample surveys
confint.svyby | Survey statistics on subsets
confint.svyglm | Confidence intervals for regression parameters
confint.svykm | Estimate survival function.
confint.svyratio | Ratio estimation
confint.svystat | Summary statistics for sample surveys
confint.svyttest | Design-based t-test
crowd | Household crowding
cv | Summary statistics for sample surveys
cv.default | Summary statistics for sample surveys
cv.svrepratio | Summary statistics for sample surveys
cv.svrepstat | Summary statistics for sample surveys
cv.svyratio | Summary statistics for sample surveys
cv.svystat | Summary statistics for sample surveys

## -- D --

deff | Summary statistics for sample surveys
deff.default | Summary statistics for sample surveys
deff.svyby | Survey statistics on subsets
degf | Contingency tables for survey data
degf.survey.design2 | Contingency tables for survey data
degf.svyrep.design | Contingency tables for survey data
degf.twophase | Contingency tables for survey data
dim.DBIsvydesign | Dimensions of survey designs
dim.repweights_compressed | Compress replicate weight matrix
dim.survey.design | Dimensions of survey designs
dim.svyimputationList | Dimensions of survey designs
dim.svyrep.design | Dimensions of survey designs
dim.twophase | Dimensions of survey designs
dimnames.DBIsvydesign | Dimensions of survey designs
dimnames.repweights_compressed | Compress replicate weight matrix
dimnames.survey.design | Dimensions of survey designs
dimnames.svyimputationList | Dimensions of survey designs
dimnames.svyrep.design | Dimensions of survey designs
dimnames.twophase | Dimensions of survey designs
dotchart | Barplots and Dotplots
dotchart.svrepstat | Barplots and Dotplots
dotchart.svyby | Barplots and Dotplots
dotchart.svystat | Barplots and Dotplots

## -- E --

election | US 2004 presidential election data at state or county level
election_insample | US 2004 presidential election data at state or county level
election_jointHR | US 2004 presidential election data at state or county level
election_jointprob | US 2004 presidential election data at state or county level
election_pps | US 2004 presidential election data at state or county level
estWeights | Estimated weights for missing data
estWeights.data.frame | Estimated weights for missing data
estWeights.twophase | Estimated weights for missing data
extractAIC.svrepglm | Model comparison for glms.
extractAIC.svycoxph | Survey-weighted Cox models.
extractAIC.svyglm | Model comparison for glms.

## -- F --

fpc | Small survey example
ftable.svrepstat | Lay out tables of survey statistics
ftable.svyby | Lay out tables of survey statistics
ftable.svystat | Lay out tables of survey statistics

## -- G --

grake | Calibration (GREG) estimators

## -- H --

hadamard | Hadamard matrices
hospital | Sample of obstetric hospitals
HR | Wrappers for specifying PPS designs

## -- I --

image.svyrep.design | Specify survey design with replicate weights
is.hadamard | Paley-type Hadamard matrices

## -- J --

jk1weights | Compute replicate weights
jknweights | Compute replicate weights
joinCells | Experimental: Construct non-response weights

## -- L --

lines.svykm | Estimate survival function.
lines.svysmooth | Scatterplot smoothing and density estimation

## -- M --

make.calfun | Calibration metrics
make.formula | Summary statistics for sample surveys
make.panel.svysmooth | Scatterplot smoothing and density estimation
marginpred | Standardised predictions (predictive margins) for regression models.
marginpred.svycoxph | Standardised predictions (predictive margins) for regression models.
marginpred.svyglm | Standardised predictions (predictive margins) for regression models.
marginpred.svykmlist | Standardised predictions (predictive margins) for regression models.
model.frame.svyrep.design | Specify survey design with replicate weights
model.frame.twophase | Two-phase designs
mrbweights | Compute survey bootstrap weights
mu284 | Two-stage sample from MU284
multistage | Variance estimation for multistage surveys
multistage.phase1 | Two-phase designs
multistage_rcpp | Variance estimation for multistage surveys
myco | Association between leprosy and BCG vaccination

## -- N --

na.exclude.survey.design | Survey sample analysis.
na.exclude.twophase | Two-phase designs
na.fail.survey.design | Survey sample analysis.
na.fail.twophase | Two-phase designs
na.omit.survey.design | Survey sample analysis.
na.omit.twophase | Two-phase designs
neighbours | Experimental: Construct non-response weights
nhanes | Cholesterol data from a US survey
nonresponse | Experimental: Construct non-response weights

## -- O --

oldsvyquantile | Deprecated implementation of quantiles
oldsvyquantile.survey.design | Deprecated implementation of quantiles
oldsvyquantile.svyrep.design | Deprecated implementation of quantiles
onestage | Computations for survey variances
onestage.phase1 | Two-phase designs
onestrat | Computations for survey variances
onestrat.phase1 | Two-phase designs
open.DBIsvydesign | Open and close DBI connections

## -- P --

paley | Paley-type Hadamard matrices
pchisqsum | Distribution of quadratic forms
pFsum | Distribution of quadratic forms
plot.svycdf | Cumulative Distribution Function
plot.svykm | Estimate survival function.
plot.svykmlist | Estimate survival function.
plot.svysmooth | Scatterplot smoothing and density estimation
poisson_sampling | Specify Poisson sampling design
postStratify | Post-stratify a survey
postStratify.survey.design | Post-stratify a survey
postStratify.svyrep.design | Post-stratify a survey
postStratify.twophase | Post-stratify a survey
ppscov | Wrappers for specifying PPS designs
ppsmat | Wrappers for specifying PPS designs
predict.svrepglm | Survey-weighted generalised linear models.
predict.svycoxph | Survey-weighted Cox models.
predict.svyglm | Survey-weighted generalised linear models.
predict.svyolr | Proportional odds and related models
predict.svyratio | Ratio estimation
predict.svyratio_separate | Ratio estimation
print.anova.svyloglin | Loglinear models
print.nonresponse | Experimental: Construct non-response weights
print.nonresponseSubset | Experimental: Construct non-response weights
print.regTermTest | Wald test for a term in a regression model
print.summary.svyrep.design | Specify survey design with replicate weights
print.summary.svytable | Contingency tables for survey data
print.summary.twophase | Two-phase designs
print.svycdf | Cumulative Distribution Function
print.svymle | Maximum pseudolikelihood estimation in complex surveys
print.svyquantile | Deprecated implementation of quantiles
print.svyratio | Ratio estimation
print.svyratio_separate | Ratio estimation
print.svyrep.design | Specify survey design with replicate weights
print.svysmooth | Scatterplot smoothing and density estimation
print.twophase | Two-phase designs
psrsq | Pseudo-Rsquareds

## -- Q --

quantile.svykm | Estimate survival function.

## -- R --

rake | Raking of replicate weight design
regTermTest | Wald test for a term in a regression model
residuals.svrepglm | Survey-weighted generalised linear models.
residuals.svyglm | Survey-weighted generalised linear models.

## -- S --

salamander | Salamander mating data set from McCullagh and Nelder (1989)
scd | Survival in cardiac arrest
SE | Extract standard errors
SE.default | Extract standard errors
SE.svrepstat | Extract standard errors
SE.svyby | Survey statistics on subsets
SE.svyratio | Ratio estimation
sparseCells | Experimental: Construct non-response weights
stratsample | Take a stratified sample
subbootweights | Compute survey bootstrap weights
subset.survey.design | Subset of survey
subset.svyimputationList | Analyse multiple imputations
subset.svyrep.design | Subset of survey
subset.twophase | Two-phase designs
summary.svrepglm | Survey-weighted generalised linear models.
summary.svreptable | Contingency tables for survey data
summary.svyglm | Survey-weighted generalised linear models.
summary.svymle | Maximum pseudolikelihood estimation in complex surveys
summary.svyrep.design | Specify survey design with replicate weights
summary.svytable | Contingency tables for survey data
summary.twophase | Two-phase designs
survey.adjust.domain.lonely | Options for the survey package
survey.drop.replicates | Options for the survey package
survey.lonely.psu | Options for the survey package
survey.multicore | Options for the survey package
survey.replicates.mse | Options for the survey package
survey.ultimate.cluster | Options for the survey package
survey.use_rcpp | Options for the survey package
survey.want.obsolete | Options for the survey package
surveyoptions | Options for the survey package
svrepdesign | Specify survey design with replicate weights
svrepdesign.character | Specify survey design with replicate weights
svrepdesign.default | Specify survey design with replicate weights
svrepdesign.imputationList | Specify survey design with replicate weights
svreptable | Contingency tables for survey data
svrVar | Compute variance from replicates
svy.varcoef | Sandwich variance estimator for glms
svyboxplot | Histograms and boxplots
svyby | Survey statistics on subsets
svyby.default | Survey statistics on subsets
svyby.survey.design2 | Survey statistics on subsets
svybys | Survey statistics on subsets
svycdf | Cumulative Distribution Function
svychisq | Contingency tables for survey data
svychisq.survey.design | Contingency tables for survey data
svychisq.svyrep.design | Contingency tables for survey data
svyciprop | Confidence intervals for proportions
svycontrast | Linear and nonlinearconstrasts of survey statistics
svycoplot | Conditioning plots of survey data
svycoxph | Survey-weighted Cox models.
svycoxph.survey.design | Survey-weighted Cox models.
svycoxph.survey.design2 | Survey-weighted Cox models.
svycoxph.svyrep.design | Survey-weighted Cox models.
svyCprod | Computations for survey variances
svycralpha | Cronbach's alpha
svydesign | Survey sample analysis.
svydesign.character | Survey sample analysis.
svydesign.default | Survey sample analysis.
svydesign.imputationList | Survey sample analysis.
svyfactanal | Factor analysis in complex surveys (experimental).
svyglm | Survey-weighted generalised linear models.
svyglm.survey.design | Survey-weighted generalised linear models.
svyglm.svyrep.design | Survey-weighted generalised linear models.
svygofchisq | Test of fit to known probabilities
svyhist | Histograms and boxplots
svyivreg | Two-stage least-squares for instrumental variable regression
svykappa | Cohen's kappa for agreement
svykm | Estimate survival function.
svyloglin | Loglinear models
svylogrank | Compare survival distributions
svymean | Summary statistics for sample surveys
svymean.survey.design | Summary statistics for sample surveys
svymean.survey.design2 | Summary statistics for sample surveys
svymean.svyrep.design | Summary statistics for sample surveys
svymean.twophase | Summary statistics for sample surveys
svymle | Maximum pseudolikelihood estimation in complex surveys
svynls | Probability-weighted nonlinear least squares
svyolr | Proportional odds and related models
svyolr.survey.design2 | Proportional odds and related models
svyolr.svyrep.design | Proportional odds and related models
svyplot | Plots for survey data
svyplot.default | Plots for survey data
svyprcomp | Sampling-weighted principal component analysis
svypredmeans | Predictive marginal means
svyqqmath | Quantile-quantile plots for survey data
svyqqplot | Quantile-quantile plots for survey data
svyquantile | Quantiles under complex sampling.
svyquantile.survey.design | Quantiles under complex sampling.
svyquantile.svyrep.design | Quantiles under complex sampling.
svyranktest | Design-based rank tests
svyratio | Ratio estimation
svyratio.survey.design | Ratio estimation
svyratio.survey.design2 | Ratio estimation
svyratio.svyrep.design | Ratio estimation
svyratio.twophase | Ratio estimation
svyrecvar | Variance estimation for multistage surveys
svyrecvar.phase1 | Two-phase designs
svyscoretest | Score tests in survey regression models
svyscoretest.svyglm | Score tests in survey regression models
svysmooth | Scatterplot smoothing and density estimation
svysmooth.default | Scatterplot smoothing and density estimation
svysmoothArea | Small area estimation via basic area level model
svysmoothUnit | Smooth via basic unit level model
svystandardize | Direct standardization within domains
svysurvreg | Fit accelerated failure models to survey data
svysurvreg.survey.design | Fit accelerated failure models to survey data
svytable | Contingency tables for survey data
svytable.survey.design | Contingency tables for survey data
svytable.svyrep.design | Contingency tables for survey data
svytotal | Summary statistics for sample surveys
svytotal.survey.design | Summary statistics for sample surveys
svytotal.survey.design2 | Summary statistics for sample surveys
svytotal.svyrep.design | Summary statistics for sample surveys
svytotal.twophase | Summary statistics for sample surveys
svyttest | Design-based t-test
svyvar | Summary statistics for sample surveys
svyvar.survey.design | Summary statistics for sample surveys
svyvar.svyrep.design | Summary statistics for sample surveys

## -- T --

trimWeights | Trim sampling weights
trimWeights.survey.design2 | Trim sampling weights
trimWeights.svyrep.design | Trim sampling weights
twophase | Two-phase designs
twophase2var | Two-phase designs
twophasevar | Two-phase designs

## -- U --

unwtd.count | Survey statistics on subsets
update.DBIsvydesign | Add variables to a survey design
update.survey.design | Add variables to a survey design
update.svyloglin | Loglinear models
update.svyrep.design | Add variables to a survey design
update.twophase | Add variables to a survey design

## -- V --

vcov.svrepstat | Summary statistics for sample surveys
vcov.svyglm | Survey-weighted generalised linear models.
vcov.svymle | Maximum pseudolikelihood estimation in complex surveys
vcov.svyrep.design | Compute variances by replicate weighting
vcov.svystat | Summary statistics for sample surveys

## -- W --

weights.nonresponse | Experimental: Construct non-response weights
weights.survey.design | Survey design weights
weights.survey_fpc | Survey design weights
weights.svyrep.design | Survey design weights
with.svyimputationList | Analyse multiple imputations
withPV.survey.design | Analyse plausible values in surveys
withReplicates | Compute variances by replicate weighting
withReplicates.svrepstat | Compute variances by replicate weighting
withReplicates.svrepvar | Compute variances by replicate weighting
withReplicates.svyimputationList | Compute variances by replicate weighting
withReplicates.svyrep.design | Compute variances by replicate weighting

## -- X --

xdesign | Crossed effects and other sparse correlations

## -- Y --

yrbs | One variable from the Youth Risk Behaviors Survey, 2015.

## -- misc --

.svycheck | Update to the new survey design format
[.nonresponse | Experimental: Construct non-response weights
[.repweights_compressed | Compress replicate weight matrix
[.survey.design | Subset of survey
[.svyrep.design | Specify survey design with replicate weights
[.twophase | Two-phase designs