Please always cc the mailing list when responding.
You haven't actually stated what the problem is. What exactly do you mean
by "I can't get the factors in the metaregression"? What error do you get?
Or what is the output that you get that is not in accordance with what you
were expecting?
Best,
Wolfgang
-----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
projects with metafor, it never encountered this issue before, so i am
what is causing it.
I have re-started the project in a new space after having updated R,
metafor to the most recent versions. The issue persists.
Have you ever encountered this issue before? all the other parts works,
the meta regressions that is causing some troubles.
Thanks a lot for having developed such a great tool, and let me know if
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
String variables are automatically converted to factors, so using
doesn't change anything.
As for the interpretation of results when including factor variables in
-----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