Software

DCPOtools

Solt, Frederick, Yuehong Cassandra Tai, Yue Hu, Hyein Ko, and Byung-Deuk Woo. 2019. “DCPOtools: Tools for Preparing Survey Data for DCPO.” https://github.com/fsolt/DCPOtools.

Dynamic Comparative Public Opinion (DCPO) analyses generate estimates of latent public opinion that are comparable across countries and over time from hundreds or thousands of surveys, but collecting and formatting these survey data is a formidable challenge. The DCPOtools package streamlines these initial steps, providing tools for downloading survey datasets, extracting the needed data, correctly identifying and standardizing the countries and years surveyed, applying survey weights, and arranging the resulting information into the format required to generate DCPO estimates.

To install:

DCPOtools is not available on CRAN. Install its latest version with the following command:

remotes::install_github("fsolt/DCPOtools")

DCPO

Solt, Frederick. 2020. “DCPO: Dynamic Comparative Public Opinion.” The Comprehensive R Archive Network (CRAN).

The study of comparative public opinion has been hampered by data that is sparse, that is, unavailable for many countries and years; incomparable, i.e., ostensibly addressing the same issue but generated by different survey items; or, most often, both. DCPO is an R package for estimating latent public opinion from cross-national survey data to maximize the information gleaned from available sources, overcome issues of missing and incomparable data, and allow comparativists to examine the dynamics of public opinion across countries.

For a detailed description, see the paper here.

To install:

  • the latest released version: install.packages("DCPO", dependencies = TRUE)
  • the latest development version: remotes::install_github("fsolt/DCPO", dependencies = TRUE)

Note that DCPO depends on stan. So, please install rstan and rstantools first. See the detailed instructions here.

Windows users may encounter some issues when installing DCPO due to the version or system settings. We recommend installing the proper version of R and Stanheaders package first.

Note: Development of CmdStan, available on R via CmdStanR, has far outstripped that of the rstan package on which DCPO is based. DCPO estimates can now be generated much, much faster (wallclock times of < 2%) by passing the DCPO Stan file to CmdStanR. See here for an example.