#### Orange Trees: Non-linear growth curve

We repeat the Otrees example, replacing the 3 independent univariate Normal priors for each φik, k=1,2,3 by a multivariate Normal prior φi ~ MNV(μ, Τ)

model {
for (i in 1:K) {
for (j in 1:n) {
Y[i, j] ~ dnorm(eta[i, j], tauC)
eta[i, j] <- phi[i, 1] / (1 + phi[i, 2] * exp(phi[i, 3] * x[j]))
}
phi[i, 1] <- exp(theta[i, 1])
phi[i, 2] <- exp(theta[i, 2]) - 1
phi[i, 3] <- -exp(theta[i, 3])
theta[i, 1:3] ~ dmnorm(mu[1:3], tau[1:3, 1:3])
}
mu[1:3] ~ dmnorm(mean[1:3], prec[1:3, 1:3])
tau[1:3, 1:3] ~ dwish(R[1:3, 1:3], 3)
sigma2[1:3, 1:3] <- inverse(tau[1:3, 1:3])
for (i in 1 : 3) {sigma[i] <- sqrt(sigma2[i, i]) }
tauC ~ dgamma(1.0E-3, 1.0E-3)
sigmaC <- 1 / sqrt(tauC)
}

##### Data
```    list(n = 7, K = 5, x = c(118.00, 484.00, 664.00, 1004.00, 1231.00, 1372.00, 1582.00),      Y = structure(         .Data = c(30.00, 58.00, 87.00, 115.00, 120.00, 142.00, 145.00,                   33.00, 69.00, 111.00, 156.00, 172.00, 203.00, 203.00,                   30.00, 51.00, 75.00, 108.00, 115.00, 139.00, 140.00,                   32.00, 62.00, 112.00, 167.00, 179.00, 209.00, 214.00,                   30.00, 49.00, 81.00, 125.00, 142.00, 174.00, 177.00),          .Dim = c(5, 7)),         mean = c(0, 0, 0),         R = structure(.Data = c(0.1, 0, 0,                                       0, 0.1, 0,                                       0, 0, 0.1), .Dim = c(3, 3)),         prec = structure(.Data = c(1.0E-6, 0, 0,                                       0, 1.0E-6, 0,                                       0, 0, 1.0E-6), .Dim = c(3, 3))) ```
##### Inits for chain 1
```    list(theta = structure(      .Data = c(5, 2, -6,                5, 2, -6,                5, 2, -6,                5, 2, -6,                5, 2, -6),       .Dim = c(5, 3)),       mu = c(5, 2, -6),       tau = structure(.Data = c(0.1, 0, 0,                                    0, 0.1, 0,                                    0, 0, 0.1), .Dim = c(3, 3)),      tauC = 20) ```

##### Inits for chain 2
```    list(theta = structure(      .Data = c(3.0, 1.0, -1.0,                3.0, 1.0, -1.0,                3.0, 1.0, -1.0,                3.0, 1.0, -1.0,                3.0, 1.0, -1.0),       .Dim = c(5, 3)),       mu = c(3.0, 1.0, -1.0),       tau = structure(.Data = c(2.0, 0, 0,                                    0, 2.0, 0,                                    0, 0, 2.0), .Dim = c(3, 3)),      tauC = 2) ```

Results