Skip to content
Prev 15117 / 20628 Next

"varFunc" classes

Hi thanks for this Ben I am still at the playing stage (and I am new to all this and so am at the bewildered and learning stage) but I am trying to fit an individual patient data meta-analysis with continuous data for the first time.

In the paper "A general framework for the use of logistic regression models in meta-analysis", Simmonds and Higgins suggest fitting the model for binary outcome data 

glmer(cbind(event,n-event) ? factor(study) + factor(treat) + (treat-1|study), data=HRT2, family=binomial(link="logit?)) 

(see their appendix) so I thought 

fm10 <- lme(OUT ~ factor(study)+treat, data = DD, random = ~  treat-1|study,weights=varIdent(form = ~ 1 | study),control=list(maxIter
= 500, msMaxIter = 500))

Would just be a natural continuous version of this (allowing different residual variances in each study also, this is usually considered important, and also upping the maxits to get convergence). In Higgins and Simmonds treat is binary so +treat and +factor(treat) are the same thing in the fixed effect part of the model, the intuition is (as I understand it) you want a different baseline average in each study (so factor(study)) because this is bound to vary and also the treatment effect to differ randomly from one study to the next, to relax the strong assumption that the treatment effect is the same for each study.

I hope that helps explain my motivation, essentially I am "just" trying to "copy" what Simmonds and Higgins did for binary data in the continuous case.

Dan


-----Original Message-----
From: Ben Bolker [mailto:bbolker at gmail.com] 
Sent: 15 December 2016 16:59
To: Dan Jackson
Cc: Dan Jackson; r-sig-mixed-models at r-project.org; daniel.jackson at mrc-bsu.cam.ac.uk
Subject: Re: [R-sig-ME] "varFunc" classes

  It doesn't generally make sense to include a factor ("study" in your
case) as both a random and a fixed effect in the same model; I appreciate that you're trying to include only the variability among treatments within studies, but this is a little bit tricky from both a practical and a conceptual point of view.  Is there a reason that you're using

 OUT ~ factor(study)+treat, data = DD, random = ~ treat-1|study

and not

 OUT ~ treat, data=DD, random= ~treat|study

or

  OUT ~ treat, data=DD, random=~1|study/treat

?  The latter estimates the variation of treatments within studies as compound symmetric, which is a little bit easier computationally.
On Thu, Dec 15, 2016 at 6:42 AM, Dan Jackson <dan.jackson at mrc-bsu.cam.ac.uk> wrote: