write.ma.model.Rd
Convert template ma.model.template.R to a JAGS model.
write.ma.model(
modelfile,
outfile,
reg.model,
pr.dist,
pr.param.a,
pr.param.b,
n,
trt.n,
site.n,
ghs.n,
tauA,
tauB
)
model template file (ma.model.template.R)
file name of model created
structure of regression model
A string representing the root distribution name used by R, e.g. 'norm', 'lnorm', 'gamma', 'beta', etc.
first parameter value accepted by pr.dist
second parameter value accepted by pr.dist
number of observations in data
number of distinct treatments in data
number of distinct sites in data
= 1 if only non-greenhouse or greenhouse studies included, 2 if both
parameter a for gamma prior on precision
parameter b for gamma prior on precision
Nothing, but as a side effect, the model is written
Writes a meta-analysis model based on available data and prior specification.
Inspired by the R2WinBUGS::write.model
by Jouni Kerman and Uwe Ligges.