[R] LME as part of meta-analysis

Viechtbauer Wolfgang (STAT) Wolfgang.Viechtbauer at STAT.unimaas.nl
Sun Mar 29 01:02:20 CET 2009

Don't worry Emmanuel, not even people in Germany can figure out how exactly my last name is spelled =)

I am actually getting quite close to finishing and releasing a first version of the package. The mima function will become obsolete at that point. 

Regarding the original post -- I am not sure if mima (or the new package) can do what the original poster wants to do. Well, actually, I don't quite understand what the original poster wants to do. Especially this part is confusing:

a<-summary(lme(alp~1,random=~1|alp, weights=varFixed(~staalp^2)))

alp is used as the dependent variable but also as the grouping variable for a random intercept. Not sure what that is supposed to do.

If the goal is simply to fit a linear model (in this case, it seems like the model is supposed to only include the intercept) with alp as the dependent variable with (approximately) known sampling variances equal to staalp^2 and a random intercept (which essentially comes down to the meta-analytic random-effects model), then the mima function can do. The same is true for the appropriate functions in the meta and rmeta packages.



----Original Message----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On
Behalf Of Emmanuel Charpentier Sent: Saturday, March 28, 2009 11:36
To: r-help at stat.math.ethz.ch
Subject: Re: [R] LME as part of meta-analysis

> Le vendredi 27 mars 2009 à 15:30 -0700, mrint a écrit :
>> Hi, I'm having a problem using LME and hopefully I can get some help.
>> Here is what I'm doing:
>> I have a model like this:
>> yi = alpha + theta * xi + beta * zi + error, errors are normally
>> distributed mean 0, var sigma^2
>> xi and zi are generated from normal distributions within a specified
>> range.
>> True values of alpha, theta, beta and sigma^2 are chosen with a
>> specific mean and variane tau^2.
>> I have a function which generates the yi from the other variables,
>> then a function that does a linear regression using lm to create the
>> estimates. 
>> I then want to use this data to do a meta-anaylsis with the above
>> repeated between 10-20 times.  Within this, I want to use lme to
>> create estimates for the average true value, sample mean and average
>> standard error for alpha, theta, beta and the respective tau^2 values
>> for each of these.  For the lme part, I'm using this
>> a<-summary(lme(alp~1,random=~1|alp, weights=varFixed(~staalp^2)))
>> This is the one for alpha.  This isn't producing the type of results I
>> would expect, can anyone see where I'm going wrong?
> (I suppose that your simulation aims to assess a specific model)
> This, and closely related subjects, have already been discussed on this
> very list. To make a long story short : lme doesn't (currently) accepts
> means and variances of groups as an input, it needs individual data.
> Someone (that should be Wolfgang Vischbauer, but I'm almost surely
> mutilating his name's spelling ; apologies, Wolfgang !) has written,
> specifically for meta-regression purposes, a "mima" function that does
> what you're requesting. Wolfgang has stated his intentions to turn this
> function into a full-fledged R package (with calling conventions closer
> to what other regression functions use), but the "mima" function
> available on his site still his 2 years old 0.4 version. For further
> details, look for "mima" or for "meta-regression" in the list archives.
> RSiteSearch() is your friend...          
> However, if what you're interested with is strictly speaking a
> meta-analysis of 2-samples comparisons (i. e. your theta is scalar and
> your x_i are logicals), (at least) two R packages available on CRAN are
> built for this purpose : rmeta and meta. Both offer separate analyses for
> boolean or continuous dependent variables (i. e. y_i logical or
> continuous).     
> If your theta is scalar but your x_i is continuous (i. e. you're
> meta-analysing a single regression coefficient), both package offer a
> variant for meta-analysis of effects, that might be relevant for you.  
> A more general solution would be to enhance the forthcoming lme4 package
> to accept an alternative specification of random effects
> variances-covariances, which would allow "general" meta-regression. But I
> understand that Douglas Bates has already way too much work and not too
> much time on his hands, and I doubt he might be coaxed to work in this
> direction right now...     
> A suggestion : you might forward your question to the "r-mixed-models"
> SIG mailing list with some profit... 
> 					Emmanuel Charpentier
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help 
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html 
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list