Learn R Programming

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

survey (version 4.2-1)

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.

Copy Link

Version

Install

install.packages('survey')

Monthly Downloads

77,056

Version

4.2-1

License

GPL-2 | GPL-3

Maintainer

Thomas Lumley

Last Published

May 3rd, 2023

Functions in survey (4.2-1)

estweights

Estimated weights for missing data
crowd

Household crowding
ftable.svystat

Lay out tables of survey statistics
confint.svyglm

Confidence intervals for regression parameters
election

US 2004 presidential election data at state or county level
hadamard

Hadamard matrices
calibrate

Calibration (GREG) estimators
dimnames.DBIsvydesign

Dimensions of survey designs
fpc

Small survey example
compressWeights

Compress replicate weight matrix
nonresponse

Experimental: Construct non-response weights
marginpred

Standardised predictions (predictive margins) for regression models.
hospital

Sample of obstetric hospitals
nhanes

Cholesterol data from a US survey
mu284

Two-stage sample from MU284
myco

Association between leprosy and BCG vaccination
make.calfun

Calibration metrics
open.DBIsvydesign

Open and close DBI connections
paley

Paley-type Hadamard matrices
oldsvyquantile

Deprecated implementation of quantiles
regTermTest

Wald test for a term in a regression model
stratsample

Take a stratified sample
rake

Raking of replicate weight design
postStratify

Post-stratify a survey
pchisqsum

Distribution of quadratic forms
scd

Survival in cardiac arrest
salamander

Salamander mating data set from McCullagh and Nelder (1989)
poisson_sampling

Specify Poisson sampling design
subset.survey.design

Subset of survey
surveyoptions

Options for the survey package
svrVar

Compute variance from replicates
psrsq

Pseudo-Rsquareds
svrepdesign

Specify survey design with replicate weights
surveysummary

Summary statistics for sample surveys
svy.varcoef

Sandwich variance estimator for glms
svyciprop

Confidence intervals for proportions
svyCprod

Computations for survey variances
svytable

Contingency tables for survey data
svygofchisq

Test of fit to known probabilities
svyby

Survey statistics on subsets
svycoxph

Survey-weighted Cox models.
svyglm

Survey-weighted generalised linear models.
svycralpha

Cronbach's alpha
svycontrast

Linear and nonlinearconstrasts of survey statistics
svycoplot

Conditioning plots of survey data
svyivreg

Two-stage least-squares for instrumental variable regression
svyhist

Histograms and boxplots
svycdf

Cumulative Distribution Function
svyfactanal

Factor analysis in complex surveys (experimental).
svydesign

Survey sample analysis.
svyloglin

Loglinear models
svyolr

Proportional odds and related models
svyprcomp

Sampling-weighted principal component analysis
svymle

Maximum pseudolikelihood estimation in complex surveys
svyplot

Plots for survey data
svynls

Probability-weighted nonlinear least squares
svykappa

Cohen's kappa for agreement
svylogrank

Compare survival distributions
svypredmeans

Predictive marginal means
svysmooth

Scatterplot smoothing and density estimation
svyrecvar

Variance estimation for multistage surveys
svyttest

Design-based t-test
svyscoretest

Score tests in survey regression models
svysurvreg

Fit accelerated failure models to survey data
svykm

Estimate survival function.
svyqqplot

Quantile-quantile plots for survey data
withPV.survey.design

Analyse plausible values in surveys
with.svyimputationList

Analyse multiple imputations
svystandardize

Direct standardization within domains
newsvyquantile

Quantiles under complex sampling.
svyranktest

Design-based rank tests
update.survey.design

Add variables to a survey design
yrbs

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

Compute variances by replicate weighting
svyratio

Ratio estimation
xdesign

Crossed effects and other sparse correlations
twophase

Two-phase designs
weights.survey.design

Survey design weights
trimWeights

Trim sampling weights
SE

Extract standard errors
HR

Wrappers for specifying PPS designs
brrweights

Compute replicate weights
as.svrepdesign

Convert a survey design to use replicate weights
bootweights

Compute survey bootstrap weights
api

Student performance in California schools
barplot.svystat

Barplots and Dotplots
as.svydesign2

Update to the new survey design format
anova.svyglm

Model comparison for glms.
as.fpc

Package sample and population size data