[R-meta] mods~factor

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Tue Jun 29 17:15:31 CEST 2021


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 using 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 using 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 using r-project.org] On
>>Behalf Of angelo solarino
>>Sent: Tuesday, 29 June, 2021 12:21
>>To: r-sig-meta-analysis using 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


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