Learn R Programming

⚠️There's a newer version (4.4-2) of this package.Take me there.

survey (version 3.37)

Analysis of Complex Survey Samples

Description

Summary statistics, two-sample tests, rank tests, generalised linear models, cumulative link models, Cox models, loglinear models, and general maximum pseudolikelihood estimation for multistage stratified, cluster-sampled, unequally weighted survey samples. Variances by Taylor series linearisation or replicate weights. Post-stratification, calibration, and raking. Two-phase subsampling designs. Graphics. PPS sampling without replacement. Principal components, factor analysis.

Copy Link

Version

Install

install.packages('survey')

Monthly Downloads

77,056

Version

3.37

License

GPL-2 | GPL-3

Maintainer

Thomas Lumley

Last Published

January 21st, 2020

Functions in survey (3.37)

confint.svyglm

Confidence intervals for regression parameters
estweights

Estimated weights for missing data
brrweights

Compute replicate weights
hospital

Sample of obstetric hospitals
calibrate

Calibration (GREG) estimators
ftable.svystat

Lay out tables of survey statistics
compressWeights

Compress replicate weight matrix
make.calfun

Calibration metrics
scd

Survival in cardiac arrest
regTermTest

Wald test for a term in a regression model
crowd

Household crowding
fpc

Small survey example
open.DBIsvydesign

Open and close DBI connections
dimnames.DBIsvydesign

Dimensions of survey designs
svyciprop

Confidence intervals for proportions
nonresponse

Experimental: Construct non-response weights
rake

Raking of replicate weight design
nhanes

Cholesterol data from a US survey
svytable

Contingency tables for survey data
svyglm

Survey-weighted generalised linear models.
psrsq

Pseudo-Rsquareds
hadamard

Hadamard matrices
paley

Paley-type Hadamard matrices
mu284

Two-stage sample from MU284
svycontrast

Linear and nonlinearconstrasts of survey statistics
marginpred

Standardised predictions (predictive margins) for regression models.
svycoplot

Conditioning plots of survey data
surveyoptions

Options for the survey package
svymle

Maximum pseudolikelihood estimation in complex surveys
svyquantile

Quantiles for sample surveys
withPV.survey.design

Analyse plausible values in surveys
svyranktest

Design-based rank tests
with.svyimputationList

Analyse multiple imputations
svylogrank

Compare survival distributions
svyhist

Histograms and boxplots
svystandardize

Direct standardization within domains
svysmooth

Scatterplot smoothing and density estimation
svysurvreg

Fit accelerated failure models to survey data
surveysummary

Summary statistics for sample surveys
svyttest

Design-based t-test
svyby

Survey statistics on subsets
election

US 2004 presidential election data at state or county level
svykm

Estimate survival function.
svycdf

Cumulative Distribution Function
svyloglin

Loglinear models
svyratio

Ratio estimation
subset.survey.design

Subset of survey
stratsample

Take a stratified sample
svycoxph

Survey-weighted Cox models.
pchisqsum

Distribution of quadratic forms
svyrecvar

Variance estimation for multistage surveys
yrbs

One variable from the Youth Risk Behaviors Survey, 2015.
withReplicates

Compute variances by replicate weighting
svycralpha

Cronbach's alpha
svrVar

Compute variance from replicates
svyfactanal

Factor analysis in complex surveys (experimental).
svyolr

Proportional odds and related models
trimWeights

Trim sampling weights
svrepdesign

Specify survey design with replicate weights
svyCprod

Computations for survey variances
svy.varcoef

Sandwich variance estimator for glms
postStratify

Post-stratify a survey
svydesign

Survey sample analysis.
svyplot

Plots for survey data
twophase

Two-phase designs
svyivreg

Two-stage least-squares for instrumental variable regression
update.survey.design

Add variables to a survey design
svypredmeans

Predictive marginal means
weights.survey.design

Survey design weights
svykappa

Cohen's kappa for agreement
svyprcomp

Sampling-weighted principal component analysis
SE

Extract standard errors
as.fpc

Package sample and population size data
HR

Wrappers for specifying PPS designs
anova.svyglm

Model comparison for glms.
api

Student performance in California schools
bootweights

Compute survey bootstrap weights
barplot.svystat

Barplots and Dotplots
as.svydesign2

Update to the new survey design format
as.svrepdesign

Convert a survey design to use replicate weights