Learn R Programming

bin2norm (version 0.1.0)

estimate_multiThresh_MCMC: Bayesian MCMC (Multiple Thresholds per Study) using rstan

Description

Builds an inline Stan model for multiple thresholds per study. The user must have the rstan package installed. We place random effects \(\mu_i = \mu_0 + \tau * mu\_raw[i]\) and use a binomial likelihood for each threshold. By default, uses simple weakly informative priors.

Usage

estimate_multiThresh_MCMC(data_list, iter = 2000, chains = 2)

Value

a list containing stan_fit (the full Stan fit object), plus mu0_est, sigma_est, tau_est as posterior means, and method="Bayesian_MCMC".

Arguments

data_list

same structure as above: n_i, c_ij, p_ij_obs

iter

number of total iterations for each chain (default 2000)

chains

number of MCMC chains (default 2)