Skip to content
Prev 1691 / 5636 Next

[R-meta] Reproducing results using regtest in metafor

Option 1 amounts to fitting the model

Y_i = b0 + b1 m.c_i + b2 se_i + e_i

with the assumption that Var(e_i) = sigma^2 v_i for unknown sigma^2.  It
can be fit using the nlme package using the following syntax (building off
of the previous code):

library(nlme)
gls_fit <- gls(yi ~ m.c + sqrt(vi), data = ma.dataset, weights = varFixed(~
vi))
summary(gls_fit)

I think the correct df would be 27 in this case.

With option 2, the residuals from the first stage have lost 2 degrees of
freedom (down to 28), and then they lose two more with the second stage fit
(because the intercept is re-estimated when it should be constrained to
zero).

James

On Fri, Aug 9, 2019 at 8:24 AM Sutton, Alex (Prof.) <ajs22 at leicester.ac.uk>
wrote:

  
  
Message-ID: <CAFUVuJwyGGQ2doesv4AK6_xPAqwy6C0Vdi4GR+Y_OMQr2gRnkg-6551@mail.gmail.com>
In-Reply-To: <AM0PR06MB4180831ECBC718809B1B70ECE8D60@AM0PR06MB4180.eurprd06.prod.outlook.com>