next up previous contents
Next: Biops: discrete variable latent Up: BUGS 0.5 Examples Volume Previous: Contents

Dugongs: a nonconjugate, nonlinear model

carlin:gelfand:91 present a nonconjugate Bayesian analysis of the following data set from ratkowsky:83:

tabular74

The data are length and age measurements for 27 captured dugongs (sea cows). carlin:gelfand:91 model this data using a nonlinear growth curve with no inflection point and an asymptote as tex2html_wrap_inline2932 tends to infinity:

eqnarray80

Standard noninformative priors are adopted for tex2html_wrap_inline2934 , tex2html_wrap_inline2914 and tex2html_wrap_inline2916 , and a uniform prior on (0,1) is assumed for tex2html_wrap_inline2940 . However, this specification leads to a non conjugate full conditional distribution for tex2html_wrap_inline2940 which is also non log-concave. This problem may be handled within BUGS by discretizing tex2html_wrap_inline2940 , and specifying equal prior probabilities for each discrete value. The BUGS code is shown below, and the graph is given in Figure 1.

model dugongs;
const
   N = 27,  # number of observations
   M = 128; # number of bins for gamma
var
  x[N],Y[N],mu[N],alpha,beta,gamma,tau,sigma,p[M],iGamma,U1,U2,U3;
data x, Y in "dugongs.dat";
inits in "dugongs.in";
{
  for (i in 1:N) {
     mu[i] <- alpha - beta*pow(gamma,x[i]);
     Y[i] ~ dnorm(mu[i],tau)
  }
  alpha ~ dnorm(0.0,1.0E-4);
  beta ~ dnorm(0.0,1.0E-4);
  tau ~ dgamma(1.0E-3,1.0E-3); sigma <- 1.0/sqrt(tau);

  iGamma ~ dcat(p[]);  # discretize gamma
  gamma <- iGamma/M;   # normalize discretized gamma to range (0,1)
  for (j in 1:M) { p[j] <- 1/M }   # equal prior for all values of iGamma
 
# Transform alpha, beta and gamma to scale used by Carlin and Gelfand
  U1 <- log(alpha);
  U2 <- log(beta);
  U3 <- logit(gamma);
}

  figure92
Figure 1:   Graphical model for dugongs example.

Analysis

After a 500 iteration burn-in, 1000 iterations took 1 minutes 41 seconds (using 128 bins for discretizing tex2html_wrap_inline2940 ). The results are shown below, together with those of Carlin and Gelfand, and Ratkowsky. Results are also given for 1000 iteration BUGS runs using 64, 32, 16, and 8 bins for tex2html_wrap_inline2940 , to illustrate the change in precision incurred by using a coarser categorization. Note that the speed of running this model in BUGS is approximately proportional to the number of bins, with the 8 bin model taking as little as 9 seconds for 1000 iterations.

tabular102

We note that the BUGS estimates and 95% intervals for log tex2html_wrap_inline2934 , log tex2html_wrap_inline2914 and tex2html_wrap_inline2986 are virtually unaffected by the number of bins chosen for tex2html_wrap_inline2940 . However, the 95% interval estimate for logit tex2html_wrap_inline2940 itself is too precise for the 16 and 8 bin models because the bin width is too coarse and nealry all the sampled values for tex2html_wrap_inline2940 fall within the same interval. The models with 32 or more bins give more realistic interval estimates.


next up previous contents
Next: Biops: discrete variable latent Up: BUGS 0.5 Examples Volume Previous: Contents

Daniel Farewell
Mon Sep 13 16:39:37 BST 1999