ccvx5_build_jags: Build 5-parameter Concavex JAGS code

Description Usage Arguments Examples

Description

This function creates JAGS code within R for fitting the 5 parameter 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
4
5
6
ccvx5_build_jags(prior.theta_0 = "theta_0 ~ dnorm(0, 1E-4)",
  prior.theta_1 = "theta_1 ~ dnorm(0, 1E-4)",
  prior.gamma_1 = "gamma_1 ~ dunif(.001, .999)",
  prior.gamma_2 = "gamma_2 ~ dunif(.001, .999)",
  prior.alpha = "alpha ~ dunif(0.001, 3.1415926/2 - .001)",
  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.gamma_1

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

prior.gamma_2

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

prior.alpha

Prior for alpha specified in terms of JAGS code. The default is a non-informative uniform prior on (0, pi/2): 'alpha ~ dunif(0.001, 3.1415926/2 - .001)'

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 <- ccvx5_build_jags()
cat(ccvx.jags.mod)

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