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