ccvx_build_jags: Build Concavex JAGS code

Description Usage Arguments Examples

Description

This function creates JAGS code within R for fitting the Concavex model. It has default non-informative priors for model parameters, but allows for specification of custom priors written in JAGS syntax

Usage

1
2
3
ccvx_build_jags(prior.theta_0 = "theta_0 ~ dnorm(0, 1E-4)",
  prior.theta_1 = "theta_1 ~ dnorm(0, 1E-4)",
  prior.lambda = "lambda ~ dunif(-.999, .999)", predictive.probs = FALSE)

Arguments

prior.theta_0

Prior for theta_0 specified in terms of JAGS code. The default is a non-informative normal prior: 'theta_0 ~ dnorm(0, 1E-4)'

prior.theta_1

Prior for theta_1 specified in terms of JAGS code. The default is a non-informative normal prior: 'theta_1 ~ dnorm(0, 1E-4)'

prior.lambda

Prior for lambda specified in terms of JAGS code. The default is a non-informative uniform prior: 'lambda ~ dunif(-.999, .999)'

predictive.probs

Indicator for whether to compute posterior predictive probabilites for a future study. default is FALSE. if set to TRUE, the ccvx_fit function requires additional inputs

Examples

1
2
ccvx.jags.mod <- ccvx_build_jags()
cat(ccvx.jags.mod)

paulmanser/concavex documentation built on May 5, 2019, 5:53 p.m.