dcpo: Estimate Dynamic Comparative Public Opinion

Description Usage Arguments Details Value Examples

View source: R/dcpo.R

Description

dcpo uses diverse survey data to estimate public opinion across countries and over time.

Usage

1
dcpo(dcpo_input, chime = TRUE, ...)

Arguments

dcpo_input

a data frame of survey items and marginals generated by DCPOtools::dcpo_setup

chime

play chime when complete?

...

arguments to be passed to rstan::stan. Defaults reset by dcpo are described below under details.

Details

dcpo, when passed a data frame dcpo_input of survey marginals created by dcpo_setup, estimates a latent variable of public opinion. See rstan::stan for additional options; stan defaults reset by dcpo are seed = 324, thin = 2, cores = min(stan_args$chains, parallel::detectCores()/2), and control <- list(adapt_delta = 0.99, stepsize = 0.005, max_treedepth = 14)

Value

a stanfit object

Examples

1
2
3
out1 <- dcpo(demsup_data,
             chains = 1,
             iter = 300) # 1 chain/300 iterations for example purposes only; use defaults

DCPO documentation built on July 8, 2020, 7:03 p.m.