urc_two_mcmc.RdFits Poisson, zero-inflated Poisson (ZIP), and negative binomial (NB) models for two independent underreported count samples using JAGS. Model selection is performed using the Deviance Information Criterion (DIC), Watanabe-Akaike Information Criterion (WAIC), and Pareto-smoothed importance sampling leave-one-out cross-validation (PSIS-LOO). For each criterion, the function applies a parsimony rule that favors the underreported Poisson model when its criterion value is within a specified threshold of the minimum value across the candidate models; otherwise, the model with the minimum criterion value is selected.
urc_two_mcmc(
x,
thresh = 2,
prior_lambda1 = "dgamma(0.1,0.1)",
prior_lambda2 = "dgamma(0.1,0.1)",
prior_p1 = "dbeta(1,1)",
prior_p2 = "dbeta(1,1)",
prior_pi1 = "dbeta(1,1)",
prior_pi2 = "dbeta(1,1)",
prior_c1 = "dgamma(0.1,0.1)",
prior_c2 = "dgamma(0.1,0.1)",
n_iter = 8000,
n_chains = 2,
n_burnin = 4000,
inits = NULL,
seed = 123,
parallel = FALSE
)A named list containing the data for JAGS models. Must include:
yobs1, yobs2 (observed counts subject to underreporting),
ystar1, ystar2 (true counts for validation),
yval1, yval2 (validation observed counts)
Numeric. The threshold used for the parsimony rule. If the
underreported Poisson model is within thresh units of the minimum
value of a model-selection criterion, the Poisson model is selected as the
preferred model; otherwise, the model with the minimum value of the
criterion is selected. Applied separately to DIC, WAIC, and PSIS-LOO. Default is 2.
Prior for lambda (sample 1, Poisson/NB)
Prior for lambda (sample 2, Poisson/NB)
Prior for reporting probability (sample 1)
Prior for reporting probability (sample 2)
Prior for zero-inflation probability (sample 1, ZIP only)
Prior for zero-inflation probability (sample 2, ZIP only)
Prior for NB dispersion (sample 1, NB only)
Prior for NB dispersion (sample 2, NB only)
Total number of MCMC iterations per chain.
Number of MCMC chains.
Number of burn-in iterations.
Optional initial values (function or list).
Random seed for reproducibility.
Logical.
If TRUE, model fitting is performed in parallel using the
future and furrr frameworks.
This enables simultaneous fitting of the Poisson, zero-inflated Poisson,
and negative binomial models across multiple workers.
If FALSE, the models are fitted sequentially.
A named list containing:
A named list of fitted rjags model objects.
A data frame containing the DIC value for each fitted model.
A data frame containing the WAIC value for each fitted model.
A data frame containing the PSIS-LOO value for each fitted model.
The preferred model selected using the DIC-based parsimony rule.
The preferred model selected using the WAIC-based parsimony rule.
The preferred model selected using the PSIS-LOO-based parsimony rule.