#JAGS model for Bayesian analysis of averages with informed priors # Pedro 05/25/2015 model { ## Priors mean_height~dnorm(m,v) #informative prior for the mean height of the plants var_height~dlnorm(mv,vv) #informative prior for the variance of the height of the plants prec <- 1/var_height #precision = 1 / variance ## Likelihood for (i in 1:nobs){ #for each plant Y[i]~dnorm(mean_height,prec) #assume the height comes from this normal distribution } }