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 working paper here.
# For the latest stable version
install.packages("DCPO", dependencies = TRUE)
# For the latest developing version
remotes::install_github("fsolt/DCPO", dependencies = TRUE)
DCPO
depends on stan
. So, please install rstan
and rstantools
first.
See the detailed instruction here.
Windows users may encounter some issues when installing DCPO
due to the version or system settings.
To minimize unnecessary disturbance, we recommand to install the proper version of R and Stanheaders
package first.
Also, when installing DCPO
, users are recommanded to set the argument dependencies
as "TRUE" in the install.packages
or remotes::install_github
functions.
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.