survey: Analysis of Complex Survey Samples

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.

Version: 4.0
Depends: R (≥ 3.1.0), grid, methods, Matrix, survival
Imports: stats, graphics, splines, lattice, minqa, numDeriv, mitools (≥ 2.4)
Suggests: foreign, MASS, KernSmooth, hexbin, RSQLite, quantreg, parallel, CompQuadForm, DBI, AER
Published: 2020-04-03
Author: Thomas Lumley
Maintainer: "Thomas Lumley" <t.lumley at>
License: GPL-2 | GPL-3
NeedsCompilation: no
Citation: survey citation info
Materials: NEWS
In views: OfficialStatistics, SocialSciences, Survival
CRAN checks: survey results


Reference manual: survey.pdf
Vignettes: Estimates in subpopulations
Two-phase designs in epidemiology
Obsolete formulas for two-phase variances
Analysing PPS designs
A survey analysis example
Package source: survey_4.0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release: survey_4.0.tgz, r-oldrel: survey_4.0.tgz
Old sources: survey archive

Reverse dependencies:

Reverse depends: CalibrateSSB, cjoint, eatRep, hopit, lavaan.survey, mapStats, MedSurvey, pedgene, relaimpo, samplingbook, sptm, ssfit, StatMatch, svydiags, svyPVpack, svyVGAM, twang
Reverse imports: aGE, anthro, apc, APCI, capm, casen, causaldrf, convey, COVIDIBGE, cregg, DAMisc, DHS.rates, dvmisc, EffectLiteR, effects, FamAgg, GB2, GJRM, GreedyExperimentalDesign, httk, ICS, ICtest, iNZightPlots, iNZightTools, jskm, jsmodule, jstable, LLM, mase, MatchThem, microsynth, mixcure, OmnibusFisher, paramhetero, Plasmode, PNADcIBGE, PNSIBGE, POFIBGE, poliscidata, pricesensitivitymeter, rareGE, RNHANES, robsurvey, SAMBA, SBdecomp, SightabilityModel, srvyr, StroupGLMM, SUMMER, SvyNom, tab, tableone, Zelig
Reverse suggests: apyramid, BIFIEsurvey, broom, broom.helpers, car, cpsvote, egor, finalfit, GENESIS, ggeffects, grattan, gtsummary, hutils, inca, inctools, insight, interactions, iNZightRegression, ipw, jtools, kyotil, logmult, mcmcsae, parameters, performance, PracTools, Qtools, questionr, rbw, rdhs, RDS, RegParallel, SDaA, sirt, sjPlot, sjstats, tidycensus, WeightIt
Reverse enhances: margins, prediction, stargazer


Please use the canonical form to link to this page.