model { Tau.noninformative <- 1.0E-4 Hyper.gamma <- 1.0E-2 # DBH for (i in 1:N.sample) { log.dbh[i] ~ dnorm(0.0, Tau.noninformative) Log.DBH[i] ~ dnorm(log.dbh[i], 50.0) log(dbh[i]) <- log.dbh[i] } # height for (i in 1:N.sample) { log.height[i] <- ( bb[1] + bs[1, Spc[i]] + log(1 - exp(-exp(bb[2] + bs[2, Spc[i]]) * dbh[i])) + (cdamage * Damage[i]) + bc[1, 1] * cnt.d95[Spc[i]] + bc[1, 2] * cnt.skewness[Spc[i]] + bc[1, 3] * cnt.dominance[Spc[i]] ) Log.Height[i] ~ dnorm(log.height[i], tau.re[1]) } # heightL for (i in 1:N.sample) { log.heightL[i] <- ( log.height[i] * exp(bb[4] + bs[4, Spc[i]]) + bb[3] + bs[3, Spc[i]] + bc[2, 1] * cnt.d95[Spc[i]] + bc[2, 2] * cnt.skewness[Spc[i]] + bc[2, 3] * cnt.dominance[Spc[i]] ) Log.HeightL[i] ~ dnorm(log.heightL[i], tau.re[2]) } # canopy width for (i in 1:N.sample) { m.log.r1[i] <- ( log.height[i] * exp(bb[6] + bs[6, Spc[i]]) + bb[5] + bs[5, Spc[i]] + bc[3, 1] * cnt.d95[Spc[i]] + bc[3, 2] * cnt.skewness[Spc[i]] + bc[3, 3] * cnt.dominance[Spc[i]] ) m.log.r2[i] <- m.log.r1[i] + log.r12 Log.R1[i] ~ dnorm(m.log.r1[i], tau.re[3]) Log.R2[i] ~ dnorm(m.log.r2[i], tau.re[3]) } log.r12 ~ dnorm(0.0, Tau.noninformative) # coefficients for (k in 1:N.bb) { bb[k] ~ dnorm(0.0, Tau.noninformative) # common part } for (k in 1:N.bs) { for (s in 1:N.spc) { # differences among species bs[k, s] ~ dnorm(0.0, tau.bs[k]) } tau.bs[k] ~ dgamma(Hyper.gamma, Hyper.gamma) # non-informative } # tree random effects? for (k in 1:N.tau.re) { tau.re[k] ~ dgamma(Hyper.gamma, Hyper.gamma) } # damage cdamage ~ dnorm(0.0, Tau.noninformative) # skewness, dominance, H99 for (k in 1:N.b){ for(kk in 1:N.bc){ bc[k, kk] ~ dnorm(0.0, Tau.noninformative) } } }