I built a model of three-component hierarchical ANOVA
based on "Dyes" example (which is a 2-component design)
and found that WinBUGS produces a very bad approximation
of mean squares.
Let's assume we have a breeding design where dams
are nested within sires and progeny within dams.
In frequentionist theory,
mean square for sires is: mss=sigma^2.pro +
number_of_progeny_per_dam*sigma^2.dam +
number_of_prog_per_dam*number_of_dams_per_sire*
sigma^2.sir ,
mean square for dams:
msd=sigma^2.pro + number_of_pro_per_dam*sigma^2.dam,
and mean square for progeny is 1/tau.pro (see model
below). Additionally, sigma^2.sir=1/tau.sir and
sigma^2.dam=1/tau.dam (see below).
mss for data provided below = 16.44 (Bugs value = 1078)
msd = 178.48 (bugs value 299)
msp = 25.35 (bugs value 101).
WHAT'S WRONG?
By the way, many thanks to those who answered my question
about contour plots; and hope that this time the server
won't be echoing my message endlessly.
Pawel Michalak
model
{
for( i in 1 : sires ) {
m[i] ~ dnorm(theta, tau.sir)
for( j in 1 : dams ) {
d[i , j] ~ dnorm(m[i], tau.dam)
for(k in 1 : progeny) {
y[i , j, k] ~ dnorm(d[i , j], tau.pro)
}
}
}
mss <- (1/tau.pro) + (progeny*(1/tau.dam)) + (progeny*dams*(1/tau.sir))
msd <- (1/tau.pro) + (progeny*(1/tau.dam))
msp <- 1/tau.pro
tau.sir ~ dgamma(0.001, 0.001)
tau.dam ~ dgamma(0.001, 0.001)
tau.pro ~ dgamma(0.001, 0.001)
theta ~ dnorm(0.0, 1.0E-10)
}
list(sires = 5, dams = 4,progeny=2
y = structure( .Data = c(63, 59,
77, 80,
84, 77,
70, 68,
60, 55,
77, 79,
84, 78,
70, 68,
60, 58,
75, 80,
84, 72,
70, 71,
60, 56,
70, 80,
84, 75,
70, 71,
65, 56,
77, 80,
86, 77,
86, 68), .Dim = c(5,4,2)))
Inits
list(theta=1500, tau.sir=1, tau.dam=1,tau.pro=1)
-------------------------------------------------------------------
To mail the BUGS list, mail to [log in to unmask]
You can search old messages at www.jiscmail.ac.uk/lists/bugs.html
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|