[R-meta] How to Get PIs for Moderator Analyses

Michael Dewey ||@t@ @end|ng |rom dewey@myzen@co@uk
Mon Jun 26 14:29:37 CEST 2023


You need to specify the values of your moderator variables for which you 
want to have predicted values.

If you do ?predict.rma and then look at the resulting output towards the 
end you can find a few examples of using newmods.

On 26/06/2023 02:12, Tori Peña via R-sig-meta-analysis wrote:
> Hi Wolfgang,
> 
> Thank you for clarifying!  I apologize for the misunderstanding.
> 
> I'm trying to use the newmods argument just now but am still confused.  
> I tried entering the moderator name which did not work.  I also checked 
> the website 
> <https://wviechtb.github.io/metafor/reference/predict.rma.html>, but I 
> don't see a way to get the PIs for the output of the moderator models 
> (see attached).  What exactly do I specify in the 'newmods' argument?
> 
> Thanks,
> Tori
> 
> On Fri, Jun 23, 2023 at 7:53 AM Viechtbauer, Wolfgang (NP) 
> <wolfgang.viechtbauer using maastrichtuniversity.nl 
> <mailto:wolfgang.viechtbauer using maastrichtuniversity.nl>> wrote:
> 
>     Dear Tori,
> 
>     The profile() function is not for getting PIs. You are
>     misunderstanding what Michael was suggesting -- he was suggesting to
>     use profile() to check if the variance components are identifiable
>     by examining the profile likelihood plots. And predict() works just
>     fine for getting PIs. Like I wrote, you have to use the 'newmods'
>     argument in predict() to specify for which combination of moderator
>     values you want to obtain a predicted effects (and the corresponding
>     CI and PI).
> 
>     Best,
>     Wolfgang
> 
>      >-----Original Message-----
>      >From: R-sig-meta-analysis
>     [mailto:r-sig-meta-analysis-bounces using r-project.org
>     <mailto:r-sig-meta-analysis-bounces using r-project.org>] On
>      >Behalf Of Tori Peña via R-sig-meta-analysis
>      >Sent: Thursday, 22 June, 2023 19:37
>      >To: R Special Interest Group for Meta-Analysis
>      >Cc: Tori Peña
>      >Subject: Re: [R-meta] How to Get PIs for Moderator Analyses
>      >
>      >Thanks, all!
>      >
>      >Unfortunately, the profile() function did not yield PIs for our
>     moderator
>      >analyses.  Are there other ways to get the PIs for rma.mv
>     <http://rma.mv> models since
>      >predict() and profile() are not working?
>      >
>      >On Thu, Jun 15, 2023 at 12:18 PM Michael Dewey via
>     R-sig-meta-analysis <
>      >r-sig-meta-analysis using r-project.org
>     <mailto:r-sig-meta-analysis using r-project.org>> wrote:
>      >
>      >> Dear Tori
>      >>
>      >> Just to clarify the reasoning behind my comments I was concerned
>     that
>      >> your data may not be adequate to fit the model since you seemed
>     to have
>      >> very small random variances and little effect from the moderators.
>      >>
>      >> Michael
>      >>
>      >> On 14/06/2023 10:22, Viechtbauer, Wolfgang (NP) via
>     R-sig-meta-analysis
>      >> wrote:
>      >> > Michael means using the profile() function.
>      >> >
>      >> > This aside, if you use predict(<model>), then it will compute
>      >> predicted/fitted values based on the model matrix (and corresponding
>      >> CIs/PIs). If you want predicted values for particular
>     combinations of
>      >> moderator values, then you have to specify the 'newmods' argument.
>      >> >
>      >> > Best,
>      >> > Wolfgang
>      >> >
>      >> >> -----Original Message-----
>      >> >> From: R-sig-meta-analysis [mailto:
>      >> r-sig-meta-analysis-bounces using r-project.org
>     <mailto:r-sig-meta-analysis-bounces using r-project.org>] On
>      >> >> Behalf Of Tori Peña via R-sig-meta-analysis
>      >> >> Sent: Tuesday, 13 June, 2023 19:51
>      >> >> To: Michael Dewey
>      >> >> Cc: Tori Peña; R Special Interest Group for Meta-Analysis
>      >> >> Subject: Re: [R-meta] How to Get PIs for Moderator Analyses
>      >> >>
>      >> >> Hi Michael,
>      >> >>
>      >> >> Thanks for your response!  What do you mean by profiling the
>     variance?
>      >> >> Yes, some of my moderators had virtually no effect in our
>     models.  I
>      >> have
>      >> >> the issue with the PI being displayed for each data point in
>     the model
>      >> >> instead of the PI for the model across all the moderators,
>      >> unfortunately.
>      >> >>
>      >> >> On Tue, Jun 6, 2023 at 12:20 PM Michael Dewey
>     <lists using dewey.myzen.co.uk <mailto:lists using dewey.myzen.co.uk>>
>      >> >> wrote:
>      >> >>
>      >> >>> Dear Tori
>      >> >>>
>      >> >>> It might help to know exactly why you think the ouput is
>     incorrect but
>      >> I
>      >> >>> notice that (a) your random effects seem to have very small
>     variances
>      >> >>> (have you tried profiling them?) (b) your moderator does not
>     seem to
>      >> >>> have much effect either.
>      >> >>>
>      >> >>> Michael
>      >> >>>
>      >> >>> On 06/06/2023 16:59, Tori Peña via R-sig-meta-analysis wrote:
>      >> >>>> Hello Listserv -
>      >> >>>>
>      >> >>>> I wanted to know if folks know of a way to get prediction
>     intervals
>      >> for
>      >> >>>> moderator analyses!  I tried the predict() function but the
>     output
>      >> looks
>      >> >>>> incorrect.  I attached a screenshot below of the code plus
>     a part of
>      >> the
>      >> >>>> output.
>      >> >>>>
>      >> >>>> Thanks in advance!
>      >> >>>>
>      >> >>>> --
>      >> >>>> *Tori Peña, Ph.D. *(she/her/ella)
>      >> >>>> Cognitive Psychology
>      >> >>>> Dept. of Psychology
>      >> >>>> Stony Brook University
>      >> >>>> Stony Brook, NY 11790-2500
>      >> >>>> Stony Brook University logo
> 
> 
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>	Virus-free.www.avg.com <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> 
> _______________________________________________
> 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

-- 
Michael
http://www.dewey.myzen.co.uk/home.html



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