write.ma.model: write.ma.model

Description Usage Arguments Details Value Author(s)

Description

Convert template ma.model.template.R to a JAGS model.

Usage

1
2
3
  write.ma.model(modelfile, outfile, reg.model, pr.dist,
    pr.param.a, pr.param.b, n, trt.n, site.n, ghs.n, tauA,
    tauB)

Arguments

modelfile

model template file (ma.model.template.R)

outfile

file name of model created

reg.model

structure of regression model

pr.dist

A string representing the root distribution name used by R, e.g. 'norm', 'lnorm', 'gamma', 'beta', etc.

pr.param.a

first parameter value accepted by pr.dist

pr.param.b

second parameter value accepted by pr.dist

n

number of observations in data

trt.n

number of distinct treatments in data

site.n

number of distinct sites in data

ghs.n

= 1 if only non-greenhouse or greenhouse studies included, 2 if both

tauA

parameter a for gamma prior on precision

tauB

parameter b for gamma prior on precision

Details

Writes a meta-analysis model based on available data and prior specification. Adapted from write.model

Value

Nothing, but as a side effect, the model is written

Author(s)

David LeBauer and Mike Dietze, based on original work on the write.model function in the R2WinBUGS package by Jouni Kerman and Uwe Ligges.


dlebauer/pecan-priors documentation built on Sept. 26, 2019, 5:03 a.m.