Creates a StanTVA model code object.
stantva_code(
formula = NULL,
locations,
task = c("wr", "pr"),
regions = list(),
C_mode = c("equal", "locations", "regions"),
w_mode = c("locations", "regions", "equal"),
t0_mode = c("constant", "gaussian", "exponential", "shifted_exponential"),
K_mode = c("bernoulli", "free", "binomial", "betabinomial", "hypergeometric", "probit"),
max_K = locations,
fixed = NULL,
parallel = isTRUE(rstan_options("threads_per_chain") > 1L),
save_log_lik = FALSE,
priors = NULL,
sanity_checks = TRUE,
debug_neginf_loglik = FALSE
)The StanTVA model code object.
Optional formulas for nested and hierarchical model parameters.
The number of display locations (items).
The task. Currently implemented: wr (whole report) and pr (partial report)
An optional list of groups of display locations (regions).
The mode/family for the \(C\) parameter.
The mode/family for the \(w\) parameter.
The mode/family for the \(t_0\) parameter.
The mode for the \(K\) parameter.
The upper bound of \(K\).
Named vector or list of parameters that are not to be sampled/fitted but fixed to their respective values.
(logical) Whether to use parallel chains.
(logical) Whether to save the log likelihood (needed for likelihood-based model comparison such as loo).
The priors.
(logical) Whether to perform sanity checks.
(logical) Whether to debug negative infinity log likelihood.
model <- stantva_code(locations = 4, task = "pr")
model
Run the code above in your browser using DataLab