urc_mcmc.RdFits Poisson, zero-inflated Poisson (ZIP), and negative binomial (NB) models for underreported count data 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_mcmc(
x,
thresh = 2,
prior_lambda = "dgamma(0.1, 0.1)",
prior_c = "dgamma(0.1, 0.1)",
prior_p = "dbeta(1, 1)",
prior_pi = "dbeta(1, 1)",
n_iter = 8000,
n_chains = 2,
n_burnin = floor(n_iter/2),
seed = 123,
inits = NULL,
parallel = FALSE,
quiet = TRUE,
...
)A named list containing:
A numeric vector of observed counts subject to underreporting
A numeric vector of true counts for the validation data.
A numeric vector of validated counts corresponding to
ystar.
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.
A prior distribution for the Poisson or ZIP rate parameter lambda.
A prior distribution for the dispersion parameter c (NB only).
A prior distribution for the reporting probability p.
A prior distribution for the zero-inflation probability pi (ZIP only).
Integer. Total number of MCMC iterations per chain.
Integer. Number of MCMC chains.
Integer. Number of burn-in iterations to discard.
Integer. Random seed for reproducibility.
Optional. A function or list specifying initial values for the MCMC.
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 with the following components:
A list of the three fitted model objects (class rjags).
A named numeric vector of DIC values for each model.
A named numeric vector of WAIC values for each model.
A named numeric vector of LOO values for each model.
The parsimonous or the model with the lowest DIC.
The parsimonous or the model with the lowest WAIC
The parsimonous or the model with the lowest PSIS-LOO