Dear All,
Based on Larry Hedge's example on multivariate meta-analysis,
I've tried to run the following multivariate model using winBUGS.
Initially, everything seems to be fine to me.
But, in tau variance and covariance matrix,
the results only show tau variances for each measure (M).
I think it should give a covariance matrix. I'm not sure why this is the
case in this model.
Any idea for this odd result(?).
I also try to get the precision of tau, sigma.
Whenever I ran the model with sigma, it gave me the error message.
I guess I misspecify some parts in this model.
If you have an idea for these problems, that will be great help for me.
Thanks,
Jung-Ho
*** WinBUGS code
list(S = 4, M=2, bd = structure(.Data = c(0.458, 0.100, 0.363, 0.241,
0.162, 0.121, 0.294,0.037),.Dim = c(4, 2)),
Td = structure(.Data = c(0.0513, 0.0319,
0.0319, 0.0501,
0.0354, 0.0222,
0.0222, 0.0351,
0.0546, 0.0344,
0.0344, 0.0545,
0.0286, 0.0179,
0.0179, 0.0286), .Dim = c(4, 2,2)),
R=structure(.Data=c(1,0,0,0.1), .Dim=c(2,2))))
list(beta=structure(.Data=c( 1,1,1,1,1,1,1,1), .Dim=c(4,2), gamma =
c(0.320689,0.121454),
tau = structure( .Data = c(0.00001, 0, 0, 0.00001), .Dim = c(2, 2)))
model
{
for (i in 1:4) {
for (j in 1:2){
b[i,j] <- bd[i,j] }}
for (i in 1:4) {
for (j in 1:2){
for (k in 1:2){
T[i,j,k] <- Td[i,j,k]
Ti[i,j,k] <- inverse(T[i,1:2, 1:2], j,k)
}}}
for (i in 1:S) {
b[i, 1:2] ~ dmnorm(beta[i,1:2], Ti[i, 1:2,1:2])
for (j in 1:M) {
beta[i, j] ~ dmnorm(gamma[j], tau[j, j])
}}
for (j in 1:M) {
gamma[ j ] ~ dnorm(0.0, 0.0001)
tau[j, j] ~ dwish(R[j, j ], 1)
}
}
}
sigma[j, j] <- inverse(tau[, ], j, j)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|