sample_stgy: Fit Bayesian 3-level logistic model to evaluate sampling...

Description Usage Arguments Value Author(s) Examples

Description

Fit a Bayesian 3-level logistic model using Stan to evaluate effect of various sampling strategies on biases of measure of association.

Usage

1
2
sample_stgy(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). 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: sample_stgy(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.