Hi metaSEM users,
I'm currently trying to use metaSEM to implement a network meta-analysis (i.e., a meta-analysis of different treatment comparisons; see Salanti, 2012). One important aspect of multivariate implementations of network meta-analysis is that the between-studies takes on a particular structure (see Lu & Ades, 2004). For example, given AB, AC, and AD, one common way to constrain the matrix is to do the following (basically, set the correlation between any two treatment comparisons equal to .5):
AB AC AD
AB s1^2 .5*s1*s2 .5*s1*s3
AC .5*s1*s2 s2^2 .5*s3*s3
AD .5*s1*s3 .5*s2*s3 s3^2
It looks like the way to impose this structure is through the RE.constraints argument. However, I'm a little in the dark about how to force the covariances to essentially be a function of the variances. Can anyone help me?
Code sample pasted below for reference.
### Begin example ###
AB AC ys
n1 n2 nT
1/n1 + 1/n2 + .3^2/(2*nT), 1/n1 + .3 * .3 / (2*nT), 1/n1 + 1/n2 + .3^2/(2*nT),
1/n1 + 1/n2 + .2^2/(2*nT), 1/n1 + .2 * .4 / (2*nT), 1/n1 + 1/n2 + .4^2/(2*nT),
1/n1 + 1/n2 + .2^2/(2*(n1 + n2)), NA, NA,
NA, NA, 1/n1 + 1/n2 + .2^2/(2*(n1 + n2)),
NA, NA, 1/n1 + 1/n2 + .1^2/(2*(n1 + n2)),
1/n1 + 1/n2 + .1^2/(2*nT), 1/n1 + .1 * .5 / (2*nT), 1/n1 + 1/n2 + .5^2/(2*nT)),
nrow = 7, ncol = 3, byrow = T)
con diag(con) # What to do with the covariances?