Learn R Programming

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

survey (version 3.3-1)

analysis of complex survey samples

Description

Summary statistics, generalised linear 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, GREG estimation, and raking. Graphics.

Copy Link

Version

Install

install.packages('survey')

Monthly Downloads

103,477

Version

3.3-1

License

LGPL

Maintainer

Thomas Lumley

Last Published

February 24th, 2026

Functions in survey (3.3-1)

as.fpc

Package sample and population size data
compressWeights

Compress replicate weight matrix
surveyoptions

Options for the survey package
withReplicates

Compute variances by replicate weighting
ftable.svystat

Lay out tables of survey statistics
as.svydesign2

Update to the new survey design format
svyratio

Ratio estimation
svyrecvar

Variance estimation for multistage surveys
surveysummary

Summary statistics for sample surveys
svycoxph

Survey-weighted Cox models.
calibrate

G-calibration (GREG) estimators
svyby

Survey statistics on subsets
svyhist

Histograms
postStratify

Post-stratify a survey
SE

Extract standard errors
svrVar

Compute variance from replicates
rake

Raking of replicate weight design
svyplot

Plots for survey data
svyquantile

Quantiles for sample surveys
svymle

Maximum pseudolikelihood estimation in complex surveys
crowd

Household crowding
api

Student performance in California schools
hadamard

Hadamard matrices
bootweights

Compute survey bootstrap weights
nonresponse

Experimental: Construct non-response weights
svydesign

Survey sample analysis.
svrepdesign

Specify survey design with replicate weights
svytable

Contingency tables for survey data
subset.survey.design

Subset of survey
svyglm

Survey-weighted generalised linear models.
svyCprod

Computations for survey variances
mu284

Two-stage sample from MU284
update.survey.design

Add variables to a survey design
svy.varcoef

Sandwich variance estimator for glms
paley

Paley-type Hadamard matrices
regTermTest

Wald test for a term in a regression model
brrweights

Compute replicate weights
as.svrepdesign

Convert a survey design to use replicate weights
weights.survey.design

Survey design weights
estweights

Estimated weights for missing data
make.calfun

Calibration metrics
anova.svyglm

Model comparison for glms.
svyfactanal

Factor analysis in complex surveys (experimental).
fpc

Small survey example
scd

Survival in cardiac arrest
dimnames.DBIsvydesign

Dimensions of survey designs
marginpred

Standardised predictions (predictive margins) for regression models.
hospital

Sample of obstetric hospitals
svyranktest

Design-based rank tests
twophase

Two-phase designs
with.svyimputationList

Analyse multiple imputations
election

US 2004 presidential election data at state or county level
nhanes

Cholesterol data from a US survey
svykm

Estimate survival function.
svycdf

Cumulative Distribution Function
svykappa

Cohen's kappa for agreement
svycontrast

Linear and nonlinearconstrasts of survey statistics
svyolr

Proportional odds and related models
svyciprop

Confidence intervals for proportions
svyttest

Design-based t-test
stratsample

Take a stratified sample
open.DBIsvydesign

Open and close DBI connections
svyloglin

Loglinear models
svyprcomp

Sampling-weighted principal component analysis
HR

Wrappers for specifying PPS designs
svysmooth

Scatterplot smoothing and density estimation
barplot.svystat

Barplots and Dotplots
svylogrank

Compare survival distributions
pchisqsum

Distribution of quadratic forms
svystandardize

Direct standardization within domains
confint.svyglm

Confidence intervals for regression parameters
svycoplot

Conditioning plots of survey data
trimWeights

Trim sampling weights