-----Original Message-----
From: angelo solarino [mailto:angelosolarino at gmail.com]
Sent: Tuesday, 29 June, 2021 17:03
To: Viechtbauer, Wolfgang (SP)
Subject: Re: [R-meta] mods~factor
Dear Wolfgan,
thank you for your quick reply.
Unfortunately, I still can't get the factors in the metaregression. In other
projects with metafor, it never encountered this issue before, so i am not certain
what is causing it.
I have re-started the project in a new space after having updated R, Rtools, and
metafor to the most recent versions. The issue persists.
Have you ever encountered this issue before? all the other parts works, it just
the meta regressions that is causing some troubles.
Thanks a lot for having developed such a great tool, and let me know if you have
any advice on how to overcome this problem.
All the best,
Angelo
Il giorno mar 29 giu 2021 alle ore 12:10 Viechtbauer, Wolfgang (SP)
<wolfgang.viechtbauer at maastrichtuniversity.nl> ha scritto:
Dear Angelo,
The factor() function is not something from metafor, but is part of R itself.
String variables are automatically converted to factors, so using factor() on them
doesn't change anything.
As for the interpretation of results when including factor variables in models,
see:
https://www.metafor-project.org/doku.php/tips:models_with_or_without_intercept
Best,
Wolfgang
-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces at r-project.org] On
Behalf Of angelo solarino
Sent: Tuesday, 29 June, 2021 12:21
To: r-sig-meta-analysis at r-project.org
Subject: [R-meta] mods~factor
DA,
I am having some trouble with the "factor" command in metafor.
I am not able to get the split for the variable field. it is a string
value. whether i add "mods~factor(field)"? or not I get the same main
effect results, and there is no error message. Can anyone help me figure
out what I am doing wrong?
res <- rma(yi,vi, mods~factor(field), data=Outcomes1, method = "HS",
subset=(ID=="XX" | ID=="XY"))
Thanks a lot for your help,
Angelo