Learn R Programming

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

survey (version 3.5)

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. Two-phase designs. Graphics.

Copy Link

Version

Install

install.packages('survey')

Monthly Downloads

98,093

Version

3.5

License

LGPL

Maintainer

Thomas Lumley

Last Published

February 24th, 2026

Functions in survey (3.5)

estweights

Estimated weights for missing data
bootweights

Compute survey bootstrap weights
ftable.svystat

Lay out tables of survey statistics
postStratify

Post-stratify a survey
as.svrepdesign

Convert a survey design to use replicate weights
api

Student performance in California schools
compressWeights

Compress replicate weight matrix
SE

Extract standard errors
mu284

Two-stage sample from MU284
svrepdesign

Specify survey design with replicate weights
brrweights

Compute replicate weights
svrVar

Compute variance from replicates
calibrate

G-calibration (GREG) estimators
svydesign

Survey sample analysis.
svyby

Survey statistics on subsets
subset.survey.design

Subset of survey
update.survey.design

Add variables to a survey design
nonresponse

Experimental: Construct non-response weights
surveyoptions

Options for the survey package
svyCprod

Computations for survey variances
svyglm

Survey-weighted generalised linear models.
svyquantile

Quantiles for sample surveys
crowd

Household crowding
svyplot

Plots for survey data
svymle

Maximum pseudolikelihood estimation in complex surveys
svycoxph

Survey-weighted Cox models.
paley

Paley-type Hadamard matrices
svyratio

Ratio estimation
rake

Raking of replicate weight design
svyrecvar

Variance estimation for multistage surveys
withReplicates

Compute variances by replicate weighting
twophase

Two-phase designs
svy.varcoef

Sandwich variance estimator for glms
regTermTest

Wald test for a term in a regression model
as.fpc

Package sample and population size data
surveysummary

Summary statistics for sample surveys
weights.survey.design

Survey design weights
svytable

Contingency tables for survey data
as.svydesign2

Update to the new survey design format
hadamard

Hadamard matrices
svyhist

Histograms and boxplots
hospital

Sample of obstetric hospitals
scd

Survival in cardiac arrest
fpc

Small survey example