Learn R Programming

survey (version 4.4-2)

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. Small-area estimation.

Copy Link

Version

Install

install.packages('survey')

Monthly Downloads

77,111

Version

4.4-2

License

GPL-2 | GPL-3

Maintainer

Last Published

March 20th, 2024

Functions in survey (4.4-2)

as.svrepdesign

Convert a survey design to use replicate weights
anova.svyglm

Model comparison for glms.
bootweights

Compute survey bootstrap weights
confint.svyglm

Confidence intervals for regression parameters
SE

Extract standard errors
brrweights

Compute replicate weights
estweights

Estimated weights for missing data
api

Student performance in California schools
crowd

Household crowding
dimnames.DBIsvydesign

Dimensions of survey designs
fpc

Small survey example
myco

Association between leprosy and BCG vaccination
open.DBIsvydesign

Open and close DBI connections
nhanes

Cholesterol data from a US survey
calibrate

Calibration (GREG) estimators
postStratify

Post-stratify a survey
paley

Paley-type Hadamard matrices
smoothUnit

Smooth via basic unit level model
election

US 2004 presidential election data at state or county level
smoothArea

Small area estimation via basic area level model
psrsq

Pseudo-Rsquareds
rake

Raking of replicate weight design
svrVar

Compute variance from replicates
ftable.svystat

Lay out tables of survey statistics
hospital

Sample of obstetric hospitals
svydesign

Survey sample analysis.
compressWeights

Compress replicate weight matrix
nonresponse

Experimental: Construct non-response weights
svyfactanal

Factor analysis in complex surveys (experimental).
oldsvyquantile

Deprecated implementation of quantiles
svrepdesign

Specify survey design with replicate weights
hadamard

Hadamard matrices
svyby

Survey statistics on subsets
svyloglin

Loglinear models
svylogrank

Compare survival distributions
svycoxph

Survey-weighted Cox models.
svycdf

Cumulative Distribution Function
make.calfun

Calibration metrics
regTermTest

Wald test for a term in a regression model
pchisqsum

Distribution of quadratic forms
svytable

Contingency tables for survey data
svycralpha

Cronbach's alpha
svyranktest

Design-based rank tests
svyciprop

Confidence intervals for proportions
svymle

Maximum pseudolikelihood estimation in complex surveys
svysmooth

Scatterplot smoothing and density estimation
marginpred

Standardised predictions (predictive margins) for regression models.
mu284

Two-stage sample from MU284
stratsample

Take a stratified sample
svyratio

Ratio estimation
subset.survey.design

Subset of survey
svystandardize

Direct standardization within domains
trimWeights

Trim sampling weights
poisson_sampling

Specify Poisson sampling design
with.svyimputationList

Analyse multiple imputations
salamander

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

Two-phase designs
svynls

Probability-weighted nonlinear least squares
svyprcomp

Sampling-weighted principal component analysis
svycontrast

Linear and nonlinearconstrasts of survey statistics
svycoplot

Conditioning plots of survey data
withPV.survey.design

Analyse plausible values in surveys
surveyoptions

Options for the survey package
svyolr

Proportional odds and related models
surveysummary

Summary statistics for sample surveys
svyplot

Plots for survey data
update.survey.design

Add variables to a survey design
scd

Survival in cardiac arrest
svy.varcoef

Sandwich variance estimator for glms
svyhist

Histograms and boxplots
svyCprod

Computations for survey variances
svyglm

Survey-weighted generalised linear models.
weights.survey.design

Survey design weights
svygofchisq

Test of fit to known probabilities
svyivreg

Two-stage least-squares for instrumental variable regression
svyrecvar

Variance estimation for multistage surveys
yrbs

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

Cohen's kappa for agreement
svykm

Estimate survival function.
svyqqplot

Quantile-quantile plots for survey data
svypredmeans

Predictive marginal means
svysurvreg

Fit accelerated failure models to survey data
svyttest

Design-based t-test
svyscoretest

Score tests in survey regression models
newsvyquantile

Quantiles under complex sampling.
withReplicates

Compute variances by replicate weighting
xdesign

Crossed effects and other sparse correlations
HR

Wrappers for specifying PPS designs
as.fpc

Package sample and population size data
barplot.svystat

Barplots and Dotplots
as.svydesign2

Update to the new survey design format