Easily Install and Load Survey Analysis Packages

Makes it easy to install and load a collection of packages for survey analysis that build upon the foundational 'survey' package of Lumley (2004) . Schneider (2025) < https://isi-iass.org/home/wp-content/uploads/Survey_Statistician_2025_January_N91_06.pdf> describes the three core packages in this collection.


surveyverse

The surveyverse package makes it easy to install and load a collection of R packages for analyzing complex survey data. The key package in this collection is the survey package of Lumley (2004). The srvyr package of Freedman Ellis and Schneider (2016) extends survey by allowing users to write code for survey data analysis in the style of the tidyverse. The svrep package extends survey’s ability to create and use replicate weights based on methods such as the generalized bootstrap or successive difference replication.

Users should cite the specific packages in this collection rather than citing surveyverse. Citations for individual packages can be obtained using the citation() function, for example by calling citation('survey').

Installation

You can install surveyverse from CRAN like so:

install.packages('surveyverse')

Usage

Calling library(surveyverse) will load the core set of packages in the surveyverse collection.

library(surveyverse)
#> ── Attaching core surveyverse packages ──────────────────── surveyverse 0.1.1 ──
#> ✔ survey 4.5       ✔ svrep  0.9.1
#> ✔ srvyr  1.3.1     
#> ── Conflicts ──────────────────────────────────────── surveyverse_conflicts() ──
#> ✖ survey::dotchart() masks graphics::dotchart()
#> ✖ srvyr::filter()    masks stats::filter()
#> ℹ Use the conflicted package to force all conflicts to become errors
#> ℹ Please cite specific packages rather than surveyverse; see `citation('surveyverse')`

Loading the package in this way will display any namespace conflicts with other packages that are currently loaded.

The set of packages in the collection can be viewed by calling surveyverse_packages(). The following non-core packages are installed with surveyverse but are not loaded:

  • svylme: For fitting linear mixed-effects models to complex survey data

  • svyVGAM: For fitting vector generalised linear models, i.e., models supported by the VGAM package

The full list of core and non-core packages can be viewed by calling surveyverse_packages(core_only = FALSE).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("surveyverse")

0.1.1 by Ben Schneider, 3 months ago


https://github.com/bschneidr/surveyverse


Report a bug at https://github.com/bschneidr/surveyverse/issues


Browse source code at https://github.com/cran/surveyverse


Authors: Ben Schneider [aut, cre, cph] , Hadley Wickham [ctb] (Vendored code from the tidyverse package is used in surveyverse)


Documentation:   PDF Manual  


GPL (>= 3) license


Imports cli, rlang, survey, srvyr, svrep, svyVGAM, svylme, stats

Suggests spelling


See at CRAN