Dear community,
I am curious about whether there is a way to fit a meta-analysis model like:
M0 <- rma(yi ~ 0, vi, data=dat)
I tried it, but rma does not allow to do so with the warning message: Cannot fit model with an empty model matrix. Coerced intercept into the model.
My motivation to do so is to get BIC and thus approximate the Bayes factor using the formula: BF_{10} = e^{(BIC_0 - BIC_1)/2, where BIC_0 is the BIC of model object M0, and BIC_1 is the BIC of model object M1 <- rma(yi ~ 1, vi, data=dat). The formula comes from the following reference:
Wagenmakers, E. J. (2007). A practical solution to the pervasive problems of p values. Psychonomic bulletin & review, 14(5), 779-804.
Both lm() and lme4() allow fitting such an intercept-removed intercept-only model. I am not sure whether the meta-analytic model is possible. Alternatively, any formula or code can get BIC directly from data rather than fitting such a 'weird' model.
Best,
Yefeng
[R-meta] remove intercept from an intercept-only model
3 messages · Wolfgang Viechtbauer, Yefeng Yang
Dear Yefeng, How to do this was discussed in this thread: https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2024-March/005126.html Best, Wolfgang
-----Original Message-----
From: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org> On Behalf
Of Yefeng Yang via R-sig-meta-analysis
Sent: Monday, September 16, 2024 07:29
To: r-sig-meta-analysis at r-project.org
Cc: Yefeng Yang <yefeng.yang1 at unsw.edu.au>
Subject: [R-meta] remove intercept from an intercept-only model
Dear community,
I am curious about whether there is a way to fit a meta-analysis model like:
M0 <- rma(yi ~ 0, vi, data=dat)
I tried it, but rma does not allow to do so with the warning message: Cannot fit
model with an empty model matrix. Coerced intercept into the model.
My motivation to do so is to get BIC and thus approximate the Bayes factor using
the formula: BF_{10} = e^{(BIC_0 - BIC_1)/2, where BIC_0 is the BIC of model
object M0, and BIC_1 is the BIC of model object M1 <- rma(yi ~ 1, vi, data=dat).
The formula comes from the following reference:
Wagenmakers, E. J. (2007). A practical solution to the pervasive problems of p
values. Psychonomic bulletin & review, 14(5), 779-804.
Both lm() and lme4() allow fitting such an intercept-removed intercept-only
model. I am not sure whether the meta-analytic model is possible. Alternatively,
any formula or code can get BIC directly from data rather than fitting such a
'weird' model.
Best,
Yefeng
Thanks for providing this useful thread. Just to repeat one simple solution presented in the thread https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2024-March/005126.html There is an undocumented argument beta in rma.mv(). If one set it to 0 (`beta=0`), one can fit the intercept of an intercept-only model to 0.
From: Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer at maastrichtuniversity.nl>
Sent: 16 September 2024 17:58
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-project.org>
Cc: Yefeng Yang <yefeng.yang1 at unsw.edu.au>
Subject: RE: [R-meta] remove intercept from an intercept-only model
Sent: 16 September 2024 17:58
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-project.org>
Cc: Yefeng Yang <yefeng.yang1 at unsw.edu.au>
Subject: RE: [R-meta] remove intercept from an intercept-only model
Dear Yefeng, How to do this was discussed in this thread: https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2024-March/005126.html Best, Wolfgang > -----Original Message----- > From: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org> On Behalf > Of Yefeng Yang via R-sig-meta-analysis > Sent: Monday, September 16, 2024 07:29 > To: r-sig-meta-analysis at r-project.org > Cc: Yefeng Yang <yefeng.yang1 at unsw.edu.au> > Subject: [R-meta] remove intercept from an intercept-only model > > Dear community, > > I am curious about whether there is a way to fit a meta-analysis model like: > M0 <- rma(yi ~ 0, vi, data=dat) > > I tried it, but rma does not allow to do so with the warning message: Cannot fit > model with an empty model matrix. Coerced intercept into the model. > > My motivation to do so is to get BIC and thus approximate the Bayes factor using > the formula: BF_{10} = e^{(BIC_0 - BIC_1)/2, where BIC_0 is the BIC of model > object M0, and BIC_1 is the BIC of model object M1 <- rma(yi ~ 1, vi, data=dat). > The formula comes from the following reference: > > Wagenmakers, E. J. (2007). A practical solution to the pervasive problems of p > values. Psychonomic bulletin & review, 14(5), 779-804. > > Both lm() and lme4() allow fitting such an intercept-removed intercept-only > model. I am not sure whether the meta-analytic model is possible. Alternatively, > any formula or code can get BIC directly from data rather than fitting such a > 'weird' model. > > Best, > Yefeng