check_incidence: Fit Bayesian 3-level Poisson model to assess bias of measure...

Description Usage Arguments Value Author(s) Examples

Description

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

Usage

1
2
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.

Author(s)

Denis Haine

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)
## End(Not run)

dhaine/misclass documentation built on May 15, 2019, 8:21 a.m.