Package: survey 4.5
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 and multiphase subsampling designs. Graphics. PPS sampling without replacement. Small-area estimation. Dual-frame designs.
Authors:
survey_4.5.tar.gz
survey_4.5.zip(r-4.5)survey_4.5.zip(r-4.4)survey_4.5.zip(r-4.3)
survey_4.5.tgz(r-4.4-x86_64)survey_4.5.tgz(r-4.4-arm64)survey_4.5.tgz(r-4.3-x86_64)survey_4.5.tgz(r-4.3-arm64)
survey_4.5.tar.gz(r-4.5-noble)survey_4.5.tar.gz(r-4.4-noble)
survey_4.5.tgz(r-4.4-emscripten)survey_4.5.tgz(r-4.3-emscripten)
survey.pdf |survey.html✨
survey/json (API)
NEWS
# Install 'survey' in R: |
install.packages('survey', repos = c('https://r-forge.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://r-forge.r-project.org/projects/r-survey
- DatA - Database of household expenses for two sampling frames
- DatB - Database of household expenses for two sampling frames
- PiklA - Database of household expenses for two sampling frames
- PiklB - Database of household expenses for two sampling frames
- apiclus1 - Student performance in California schools
- apiclus2 - Student performance in California schools
- apipop - Student performance in California schools
- apisrs - Student performance in California schools
- apistrat - Student performance in California schools
- crowd - Household crowding
- election - US 2004 presidential election data at state or county level
- election_insample - US 2004 presidential election data at state or county level
- election_jointHR - US 2004 presidential election data at state or county level
- election_jointprob - US 2004 presidential election data at state or county level
- election_pps - US 2004 presidential election data at state or county level
- fpc - Small survey example
- hospital - Sample of obstetric hospitals
- mu284 - Two-stage sample from MU284
- myco - Association between leprosy and BCG vaccination
- nhanes - Cholesterol data from a US survey
- salamander - Salamander mating data set from McCullagh and Nelder
- scd - Survival in cardiac arrest
- yrbs - One variable from the Youth Risk Behaviors Survey, 2015.
Last updated 2 months agofrom:7787a52879. Checks:OK: 1 WARNING: 8. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Oct 18 2024 |
R-4.5-win-x86_64 | WARNING | Oct 18 2024 |
R-4.5-linux-x86_64 | WARNING | Oct 18 2024 |
R-4.4-win-x86_64 | WARNING | Oct 18 2024 |
R-4.4-mac-x86_64 | WARNING | Oct 18 2024 |
R-4.4-mac-aarch64 | WARNING | Oct 18 2024 |
R-4.3-win-x86_64 | WARNING | Oct 18 2024 |
R-4.3-mac-x86_64 | WARNING | Oct 18 2024 |
R-4.3-mac-aarch64 | WARNING | Oct 18 2024 |
Exports:as.svrepdesignas.svydesign2bootweightsbrrweightscal_namescal.linearcal.logitcal.rakingcal.sinhcalibratecompressWeightscvdeffdegfdotchartestWeightsgrakehadamardHRis.hadamardjk1weightsjknweightsjoinCellsmake.calfunmake.formulamake.panel.svysmoothmarginpredmrbweightsmultiframemultiphaseneighboursnonresponseoldsvyquantilepaleypchisqsumpFsumpoisson_samplingpostStratifyppscovppsmatpsrsqrakeregTermTestreweightSEsparseCellsstratsamplesubbootweightssvrepdesignsvrVarsvyboxplotsvybysvybyssvycdfsvychisqsvycipropsvycontrastsvycoplotsvycoxphsvyCprodsvycralphasvydesignsvyfactanalsvyglmsvygofchisqsvyhistsvyivregsvykappasvykmsvyloglinsvylogranksvymeansvymlesvynlssvyolrsvyplotsvyprcompsvypredmeanssvyqqmathsvyqqplotsvyquantilesvyranktestsvyratiosvyrecvarsvyscoretestsvysmoothsvysmoothAreasvysmoothUnitsvystandardizesvysurvregsvytablesvytotalsvyttestsvyvartrimWeightstwophasetwophase2vartwophasevarunwtd.countwithCrossvalwithReplicatesxdesign
Dependencies:DBIlatticeMatrixminqamitoolsnumDerivRcppRcppArmadillosurvival
A survey analysis example
Rendered fromsurvey.Rnw
usingutils::Sweave
on Oct 18 2024.Last update: 2014-08-11
Started: 2014-08-11
Analysing PPS designs
Rendered frompps.Rnw
usingutils::Sweave
on Oct 18 2024.Last update: 2014-08-11
Started: 2014-08-11
Estimates in subpopulations
Rendered fromdomain.Rnw
usingutils::Sweave
on Oct 18 2024.Last update: 2014-08-11
Started: 2014-08-11
Computations for multiphase sampling
Rendered frommultiphase.Rmd
usingknitr::rmarkdown
on Oct 18 2024.Last update: 2024-06-07
Started: 2024-06-07
Pre-calibrated weights
Rendered fromprecalibrated.Rnw
usingutils::Sweave
on Oct 18 2024.Last update: 2022-04-29
Started: 2022-04-29
Quantile rules
Rendered fromqrule.Rnw
usingutils::Sweave
on Oct 18 2024.Last update: 2021-07-15
Started: 2020-07-26
Small area estimation
Rendered fromsurvey-sae.html.asis
usingR.rsp::asis
on Oct 18 2024.Last update: 2024-03-07
Started: 2024-03-07
Two-phase designs in epidemiology
Rendered fromepi.Rnw
usingutils::Sweave
on Oct 18 2024.Last update: 2014-08-11
Started: 2014-08-11
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Model comparison for glms. | AIC.svyglm anova.svycoxph anova.svyglm BIC.svyglm extractAIC.svrepglm extractAIC.svyglm |
Student performance in California schools | api apiclus1 apiclus2 apipop apisrs apistrat |
Package sample and population size data | as.fpc |
Convert a survey design to use replicate weights | as.svrepdesign as.svrepdesign.default as.svrepdesign.svyimputationList |
Update to the new survey design format | .svycheck as.svydesign2 |
Barplots and Dotplots | barplot.svrepstat barplot.svyby barplot.svystat dotchart dotchart.svrepstat dotchart.svyby dotchart.svystat |
Compute survey bootstrap weights | bootstratum bootweights mrbweights subbootweights |
Compute replicate weights | brrweights jk1weights jknweights |
Calibration (GREG) estimators | calibrate calibrate.survey.design2 calibrate.svyrep.design calibrate.twophase cal_names grake |
Compress replicate weight matrix | as.matrix.repweights as.matrix.repweights_compressed as.vector.repweights_compressed compressWeights compressWeights.default compressWeights.repweights_compressed compressWeights.svyrep.design dim.repweights_compressed dimnames.repweights_compressed [.repweights_compressed |
Confidence intervals for regression parameters | confint.svyglm |
Household crowding | crowd |
Dimensions of survey designs | dim.DBIsvydesign dim.survey.design dim.svyimputationList dim.svyrep.design dim.twophase dimnames.DBIsvydesign dimnames.survey.design dimnames.svyimputationList dimnames.svyrep.design dimnames.twophase |
US 2004 presidential election data at state or county level | election election_insample election_jointHR election_jointprob election_pps |
Estimated weights for missing data | estWeights estWeights.data.frame estWeights.twophase |
Small survey example | fpc |
Lay out tables of survey statistics | ftable.svrepstat ftable.svyby ftable.svystat |
Hadamard matrices | hadamard |
Sample of obstetric hospitals | hospital |
Wrappers for specifying PPS designs | HR ppscov ppsmat |
Calibration metrics | cal.linear cal.logit cal.raking cal.sinh make.calfun |
Standardised predictions (predictive margins) for regression models. | marginpred marginpred.svycoxph marginpred.svyglm marginpred.svykmlist |
Two-stage sample from MU284 | mu284 |
Dual-frame and multi-frame surveys | multiframe |
Multiphase sampling designs | multiphase |
Association between leprosy and BCG vaccination | myco |
Quantiles under complex sampling. | svyquantile svyquantile.survey.design svyquantile.svyrep.design |
Cholesterol data from a US survey | nhanes |
Experimental: Construct non-response weights | joinCells neighbours nonresponse print.nonresponse print.nonresponseSubset sparseCells weights.nonresponse [.nonresponse |
Deprecated implementation of quantiles | oldsvyquantile oldsvyquantile.survey.design oldsvyquantile.svyrep.design print.svyquantile |
Open and close DBI connections | close.DBIsvydesign open.DBIsvydesign |
Paley-type Hadamard matrices | is.hadamard paley |
Distribution of quadratic forms | pchisqsum pFsum |
Database of household expenses for two sampling frames | DatA DatB phoneframes PiklA PiklB |
Specify Poisson sampling design | poisson_sampling |
Post-stratify a survey | postStratify postStratify.survey.design postStratify.svyrep.design postStratify.twophase |
Pseudo-Rsquareds | psrsq |
Raking of replicate weight design | rake |
Wald test for a term in a regression model | print.regTermTest regTermTest |
Reweight (optimise) the weights on frames | plot.dualframe_with_rewt reweight reweight.dualframe |
Salamander mating data set from McCullagh and Nelder (1989) | salamander |
Survival in cardiac arrest | scd |
Extract standard errors | SE SE.default SE.svrepstat |
Small area estimation via basic area level model | svysmoothArea |
Smooth via basic unit level model | svysmoothUnit |
Take a stratified sample | stratsample |
Subset of survey | subset.survey.design subset.svyrep.design [.survey.design |
Options for the survey package | survey.adjust.domain.lonely survey.drop.replicates survey.lonely.psu survey.multicore survey.replicates.mse survey.ultimate.cluster survey.use_rcpp survey.want.obsolete surveyoptions |
Summary statistics for sample surveys | coef.svrepstat coef.svystat confint.svrepstat confint.svystat cv cv.default cv.svrepratio cv.svrepstat cv.svyratio cv.svystat deff deff.default make.formula svrepstat svymean svymean.survey.design svymean.survey.design2 svymean.svyrep.design svymean.twophase svystat svytotal svytotal.survey.design svytotal.survey.design2 svytotal.svyrep.design svytotal.twophase svyvar svyvar.survey.design svyvar.svyrep.design vcov.svrepstat vcov.svystat |
Specify survey design with replicate weights | image.svyrep.design model.frame.svyrep.design print.summary.svyrep.design print.svyrep.design summary.svyrep.design svrepdesign svrepdesign.character svrepdesign.default svrepdesign.imputationList [.svyrep.design |
Compute variance from replicates | svrVar |
Sandwich variance estimator for glms | svy.varcoef |
Survey statistics on subsets | coef.svyby confint.svyby deff.svyby SE.svyby svyby svyby.default svyby.survey.design2 svybys unwtd.count |
Cumulative Distribution Function | plot.svycdf print.svycdf svycdf |
Confidence intervals for proportions | svyciprop |
Linear and nonlinearconstrasts of survey statistics | svycontrast |
Conditioning plots of survey data | svycoplot |
Survey-weighted Cox models. | AIC.svycoxph extractAIC.svycoxph predict.svycoxph svycoxph svycoxph.survey.design svycoxph.survey.design2 svycoxph.svyrep.design |
Computations for survey variances | onestage onestrat svyCprod |
Cronbach's alpha | svycralpha |
Survey sample analysis. | na.exclude.survey.design na.fail.survey.design na.omit.survey.design svydesign svydesign.character svydesign.default svydesign.imputationList |
Factor analysis in complex surveys (experimental). | svyfactanal |
Survey-weighted generalised linear models. | coef.svyglm predict.svrepglm predict.svyglm residuals.svrepglm residuals.svyglm summary.svrepglm summary.svyglm svyglm svyglm.survey.design svyglm.svyrep.design vcov.svyglm |
Test of fit to known probabilities | svygofchisq |
Histograms and boxplots | svyboxplot svyhist |
Two-stage least-squares for instrumental variable regression | svyivreg |
Cohen's kappa for agreement | svykappa |
Estimate survival function. | confint.svykm lines.svykm plot.svykm plot.svykmlist quantile.svykm svykm |
Loglinear models | anova.svyloglin coef.svyloglin print.anova.svyloglin svyloglin update.svyloglin |
Compare survival distributions | svylogrank |
Maximum pseudolikelihood estimation in complex surveys | coef.svymle print.svymle summary.svymle svymle vcov.svymle |
Probability-weighted nonlinear least squares | svynls |
Proportional odds and related models | predict.svyolr svyolr svyolr.survey.design2 svyolr.svyrep.design |
Plots for survey data | svyplot svyplot.default |
Sampling-weighted principal component analysis | biplot.svyprcomp svyprcomp |
Predictive marginal means | svypredmeans |
Quantile-quantile plots for survey data | svyqqmath svyqqplot |
Design-based rank tests | svyranktest |
Ratio estimation | coef.svyratio confint.svyratio predict.svyratio predict.svyratio_separate print.svyratio print.svyratio_separate SE.svyratio svyratio svyratio.survey.design svyratio.survey.design2 svyratio.svyrep.design svyratio.twophase |
Variance estimation for multistage surveys | multistage multistage_rcpp svyrecvar |
Score tests in survey regression models | svyscoretest svyscoretest.svyglm |
Scatterplot smoothing and density estimation | lines.svysmooth make.panel.svysmooth plot.svysmooth print.svysmooth svysmooth svysmooth.default |
Direct standardization within domains | svystandardize |
Fit accelerated failure models to survey data | svysurvreg svysurvreg.survey.design |
Contingency tables for survey data | degf degf.survey.design2 degf.svyrep.design degf.twophase print.summary.svytable summary.svreptable summary.svytable svreptable svychisq svychisq.survey.design svychisq.svyrep.design svytable svytable.survey.design svytable.svyrep.design |
Design-based t-test | confint.svyttest svyttest |
Trim sampling weights | trimWeights trimWeights.survey.design2 trimWeights.svyrep.design |
Two-phase designs | model.frame.twophase multistage.phase1 na.exclude.twophase na.fail.twophase na.omit.twophase onestage.phase1 onestrat.phase1 print.summary.twophase print.twophase subset.twophase summary.twophase svyrecvar.phase1 twophase twophase2var twophasevar [.twophase |
Add variables to a survey design | update.DBIsvydesign update.survey.design update.svyrep.design update.twophase |
Survey design weights | weights.survey.design weights.survey_fpc weights.svyrep.design |
Analyse multiple imputations | subset.svyimputationList with.svyimputationList |
Crossvalidation using replicate weights | withCrossval |
Analyse plausible values in surveys | withPV.survey.design |
Compute variances by replicate weighting | vcov.svyrep.design withReplicates withReplicates.svrepstat withReplicates.svrepvar withReplicates.svyimputationList withReplicates.svyrep.design |
Crossed effects and other sparse correlations | xdesign |
One variable from the Youth Risk Behaviors Survey, 2015. | yrbs |