Skip to contents

This function creates JAGS code snippets for default MBNMA model priors.

Usage

default.priors(fun = tloglin())

Arguments

fun

An object of class "timefun" generated (see Details) using any of tloglin(), tpoly(), titp(), temax(), tfpoly(), tspline() or tuser()

Value

A list, each element of which is a named JAGS snippet corresponding to a prior in the MBNMA JAGS code.

Examples

# \donttest{
default.priors(fun=temax())
#> 'et50' parameters must take positive values.
#>  Default half-normal prior restricts posterior to positive values.
#> $rho
#> [1] "rho ~ dunif(0,1)"
#> 
#> $alpha
#> [1] "alpha[i] ~ dnorm(0,0.0001)"
#> 
#> $inv.R
#> [1] "inv.R ~ dwish(omega[,], mat.size)"
#> 
#> $rhoparam
#> [1] "rhoparam ~ dunif(-1,1)"
#> 
#> $mu.1
#> [1] "mu.1[i] ~ dnorm(0,0.0001)"
#> 
#> $m.mu.1
#> [1] "mu.1 ~ dnorm(0,0.0001)"
#> 
#> $d.1
#> [1] "d.1[k] ~ dnorm(0,0.001)"
#> 
#> $dume.1
#> [1] "d.1[c,k] ~ dnorm(0,0.001)"
#> 
#> $D.1
#> [1] "D.1[k] ~ dnorm(0,0.001)"
#> 
#> $beta.1
#> [1] "beta.1 ~ dnorm(0,0.0001)"
#> 
#> $sd.mu.1
#> [1] "sd.mu.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.1
#> [1] "sd.d.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.1
#> [1] "sd.D.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.1
#> [1] "sd.beta.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.2
#> [1] "mu.2[i] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $m.mu.2
#> [1] "mu.2 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $d.2
#> [1] "d.2[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $dume.2
#> [1] "d.2[c,k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $D.2
#> [1] "D.2[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $beta.2
#> [1] "beta.2 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $sd.mu.2
#> [1] "sd.mu.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.2
#> [1] "sd.d.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.2
#> [1] "sd.D.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.2
#> [1] "sd.beta.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.3
#> [1] "mu.3[i] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $m.mu.3
#> [1] "mu.3 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $d.3
#> [1] "d.3[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $dume.3
#> [1] "d.3[c,k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $D.3
#> [1] "D.3[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $beta.3
#> [1] "beta.3 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $sd.mu.3
#> [1] "sd.mu.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.3
#> [1] "sd.d.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.3
#> [1] "sd.D.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.3
#> [1] "sd.beta.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.4
#> [1] "mu.4[i] ~ dnorm(0,0.0001)"
#> 
#> $m.mu.4
#> [1] "mu.4 ~ dnorm(0,0.0001)"
#> 
#> $d.4
#> [1] "d.4[k] ~ dnorm(0,0.001)"
#> 
#> $dume.4
#> [1] "d.4[c,k] ~ dnorm(0,0.001)"
#> 
#> $D.4
#> [1] "D.4[k] ~ dnorm(0,0.001)"
#> 
#> $beta.4
#> [1] "beta.4 ~ dnorm(0,0.0001)"
#> 
#> $sd.mu.4
#> [1] "sd.mu.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.4
#> [1] "sd.d.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.4
#> [1] "sd.D.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.4
#> [1] "sd.beta.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.z.1
#> [1] "mu.z[i,1] ~ dnorm(0,0.0001)"
#> 
#> $z.1
#> [1] "z[1,k] ~ dnorm(0,0.0001)"
#> 
#> $mu.z.2
#> [1] "mu.z[i,2] ~ dnorm(0,0.0001) T(-d.prior[2],)"
#> 
#> $z.2
#> [1] "z[2,k] ~ dnorm(0,0.0001) T(-d.prior[2],)"
#> 

default.priors(fun=titp(p.expon=TRUE))
#> 'rate' parameters are on exponential scale to ensure they take positive values on the natural scale
#> $rho
#> [1] "rho ~ dunif(0,1)"
#> 
#> $alpha
#> [1] "alpha[i] ~ dnorm(0,0.0001)"
#> 
#> $inv.R
#> [1] "inv.R ~ dwish(omega[,], mat.size)"
#> 
#> $rhoparam
#> [1] "rhoparam ~ dunif(-1,1)"
#> 
#> $mu.1
#> [1] "mu.1[i] ~ dnorm(0,0.0001)"
#> 
#> $m.mu.1
#> [1] "mu.1 ~ dnorm(0,0.0001)"
#> 
#> $d.1
#> [1] "d.1[k] ~ dnorm(0,0.001)"
#> 
#> $dume.1
#> [1] "d.1[c,k] ~ dnorm(0,0.001)"
#> 
#> $D.1
#> [1] "D.1[k] ~ dnorm(0,0.001)"
#> 
#> $beta.1
#> [1] "beta.1 ~ dnorm(0,0.0001)"
#> 
#> $sd.mu.1
#> [1] "sd.mu.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.1
#> [1] "sd.d.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.1
#> [1] "sd.D.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.1
#> [1] "sd.beta.1 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.2
#> [1] "mu.2[i] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $m.mu.2
#> [1] "mu.2 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $d.2
#> [1] "d.2[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $dume.2
#> [1] "d.2[c,k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $D.2
#> [1] "D.2[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $beta.2
#> [1] "beta.2 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $sd.mu.2
#> [1] "sd.mu.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.2
#> [1] "sd.d.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.2
#> [1] "sd.D.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.2
#> [1] "sd.beta.2 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.3
#> [1] "mu.3[i] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $m.mu.3
#> [1] "mu.3 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $d.3
#> [1] "d.3[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $dume.3
#> [1] "d.3[c,k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $D.3
#> [1] "D.3[k] ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $beta.3
#> [1] "beta.3 ~ dnorm(0.00001,0.0001) T(0,)"
#> 
#> $sd.mu.3
#> [1] "sd.mu.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.3
#> [1] "sd.d.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.3
#> [1] "sd.D.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.3
#> [1] "sd.beta.3 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.4
#> [1] "mu.4[i] ~ dnorm(0,0.0001)"
#> 
#> $m.mu.4
#> [1] "mu.4 ~ dnorm(0,0.0001)"
#> 
#> $d.4
#> [1] "d.4[k] ~ dnorm(0,0.001)"
#> 
#> $dume.4
#> [1] "d.4[c,k] ~ dnorm(0,0.001)"
#> 
#> $D.4
#> [1] "D.4[k] ~ dnorm(0,0.001)"
#> 
#> $beta.4
#> [1] "beta.4 ~ dnorm(0,0.0001)"
#> 
#> $sd.mu.4
#> [1] "sd.mu.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.d.4
#> [1] "sd.d.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.D.4
#> [1] "sd.D.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $sd.beta.4
#> [1] "sd.beta.4 ~ dnorm(0,0.05) T(0,)"
#> 
#> $mu.z.1
#> [1] "mu.z[i,1] ~ dnorm(0,0.0001)"
#> 
#> $z.1
#> [1] "z[1,k] ~ dnorm(0,0.0001)"
#> 
#> $mu.z.2
#> [1] "mu.z[i,2] ~ dnorm(0,0.0001) T(-d.prior[2],)"
#> 
#> $z.2
#> [1] "z[2,k] ~ dnorm(0,0.0001) T(-d.prior[2],)"
#> 
# }