dcpo {DCPO}R Documentation

Estimate Dynamic Comparative Public Opinion

Description

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

Usage

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


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



[Package DCPO version 0.5.3 Index]