[R-meta] Removing intercept for all categorical variables in a single model

Reza Norouzian rnorouz|@n @end|ng |rom gm@||@com
Thu Apr 6 19:33:38 CEST 2023


Hi John,

In short, that's not possible. An alternative might be to get the marginal
mean effects for a, b, and c (
https://cran.r-project.org/web/packages/emmeans/vignettes/basics.html)
using the new function recently added by Wolfgang to the dev version (
https://www.metafor-project.org/doku.php/installation#development_version)
of metafor in conjunction with the library emmeans:

# install the dev version of metafor
# install.packages("emmeans")

library(metafor)
library(emmeans)

# *dfs = "contain"* for potentially more conservative inference assuming
you have some random effects:
results=rma.mv(yi,vi,mods=~a+b+c, random= ..., data=datum, dfs = "contain")

grd <- emmprep(results)

emmeans(grd, ~a+b+c)

Kind regards,
Reza

On Thu, Apr 6, 2023 at 10:44 AM John Mahas via R-sig-meta-analysis <
r-sig-meta-analysis using r-project.org> wrote:

> Hi All,
>
> I am using the rma.mv function in R for a meta-analysis project where I
> have multiple categorical moderator variables. I am trying to get the
> intercept removed from these moderators, but it is only removing the
> intercept from the first moderator listed in the code (see example below).
>
> results=rma.mv(yi,vi,mods=~a-1+b-1+c-1,data=datum)
>
> If I ran the example here, it would remove the intercept for "a" but not
> "b" and "c". Is there a way I can remove the intercept for the other
> moderators as well? If so, how?
>
> Thanks,
>
> John Mahas
>
>
> _________________________
>
> John W. Mahas
>
> Graduate Research Assistant
>
> Auburn University
>
> Department of Entomology and Plant Pathology
> 301 Funchess Hall
>
> Auburn, AL 36849
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-meta-analysis mailing list @ R-sig-meta-analysis using r-project.org
> To manage your subscription to this mailing list, go to:
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>

	[[alternative HTML version deleted]]



More information about the R-sig-meta-analysis mailing list