[R-meta] remove intercept from an intercept-only model
Yefeng Yang
ye|eng@y@ng1 @end|ng |rom un@w@edu@@u
Mon Sep 16 13:01:43 CEST 2024
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 using maastrichtuniversity.nl>
Sent: 16 September 2024 17:58
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-project.org>
Cc: Yefeng Yang <yefeng.yang1 using 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 using 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 using r-project.org
> Cc: Yefeng Yang <yefeng.yang1 using 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
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list