[R-sig-ME] MCMCglmm: meta-analysis problem
Gustaf.Granath at ebc.uu.se
Fri Apr 16 11:45:58 CEST 2010
Excellent! Works and the results seem to be reasonable.
However, how would I add a hierarchical level on this?
If we have the model
y=bX + tau2 + V (V=the known co-variance matrix), your code give me b
and tau2. But there might be another level of dependence in the data,
for example, research groups (so studies are nested in research groups,
call it batches). This would lead co-variances within each research
group (i.e. batch). A common co-variance is ok (at least to start with).
So we get,
y=bX + D + V, (D=tau2*I + hierarchical group blocks with the co-variances)
I have problems to add this. I played around but nothing really worked
out. I tried the rcov argument:
On 2010-04-15 18:02, Jarrod Hadfield wrote:
> Hi Gustaf,
> It's not pretty, but I believe it works:
> Z<-model.matrix(~Experiment-1, testdata)%*%Rsvd
> prior=list(R=list(V=1, nu=0), G=list(G1=list(V=1, fix=1)))
> m1<-MCMCglmm(y~1, random=~idv(Z), data=testdata, prior=prior)
> It works because Z%*%t(Z) = Rmat, and idv fits a common variance to
> all terms in Z. Since we have fixed this variance to one then the
> random term is essentially fitting Rmat as a known covariance structure.
> MCMCglmm always fits random effect meta-analysis, because a) that is
> the way I wrote it and b) I think it is an odd assumption to believe
> that with enough replication every experiment should produce exactly
> the same answer. Hence this model is fitting i.i.d residuals after
> accounting for (correlated) measurement error.
> On 15 Apr 2010, at 12:50, Gustaf Granath wrote:
>> In a meta-analysis, the SEs of the outcomes are known. However in
>> some cases, the correlation (co-variances) among outcomes are known
>> as well. For example when you have multiple outcomes from one study.
>> I wanted to see if the whole error structure of measurement errors
>> (the R-structure in MCMCglmm, or?) can be passed and not only the
>> ##test data
>> Rmat is the known covariance structure of the experimental outcomes.
>> #"normal" meta-analysis using only the diagonal:
>> prior = list(R = list(V = 1, n=1,fix = 1),G = list(G1 = list ( V =
>> 1, n = 1)))
>> model1 <- MCMCglmm(y ~ 1, random = ~idh(sqrt(yvar)):units ,data =
>> #OR (should be equal right? give sligtly different results though):
>> model2 <- MCMCglmm(y ~ 1, random = ~Experiment ,data = testdata,
>> #Now I want to include the known within-study correlation.
>> prior = list(R = list(V = Rmat, fix = 1),G = list(G1 = list ( V =
>> (1), nu = 0.002)))
>> model1 <- MCMCglmm(y ~ 1, random = ~idh(Experiment):units, rcov = ~
>> us(Study):Experiment ,data = testdata,
>> This did not work (I tried other ways as well but all failed) and I
>> guess that it is because of my R-structure prior. Is there an
>> alternative specification, or? (I played around a little with the
>> "animal" argument but I couldnt get to do what I wanted.)
>> Gustaf Granath (PhD student)
>> Dept of Plant Ecology
>> Uppsala University
Gustaf Granath (PhD student)
Dept of Plant Ecology
Evolutionary Biology Centre (EBC)
Norbyvägen 18D, SE - 752 36 Uppsala, Sweden
Tel: +46 (0)18-471 28 82
Email: Gustaf.Granath at ebc.uu.se
More information about the R-sig-mixed-models