Fit a Bayesian 3-level Poisson model using Stan to evaluate true incidence, quantify bias, and compare relative impact of selection vs. misclassification biases.

check_incidence(data, iter = 500, warmup = 100, chains = 4, cores,
  seed = 123, nsimul)

Arguments

data

Data file.

iter

A positive integer specifying how many iterations for each chain (including warmup). The default is 500.

warmup

a positive integer specifying number of warmup (aka burnin) iterations. Warmup samples should not be used for inference. The number of warmup should not be larger than iter and the default is 100.

chains

A positive integer specifying number of chains. Defaults to 4.

cores

Number of cores to use when executing the chains in parallel (up to the number of chains).

seed

Positive integer. Used by set.seed to make results reproducible.

nsimul

Number of simulations.

Value

An object of class stanfit.

Examples

sim_list <- vector("list", 1) set.seed(123) sim_list <- replicate(n = 1, expr = make_data(100, 30, "saureus"), simplify = FALSE)
# NOT RUN { check_incidence(sim_list, iter = 200, warmup = 25, chains = 1, cores = 1, seed = 123, nsimul = 1) # }