[R-meta] cooks.distance.rma.mv is slow on complex models

Michael Dewey lists at dewey.myzen.co.uk
Tue Jul 25 19:09:25 CEST 2017


Dear Roger

I appreciate this is not what you asked but your last level corresponds 
to very little variance so I wonder whether it is worth including at all.

On 25/07/2017 17:56, Martineau, Roger wrote:
> Dear metafor users,
>
>
>
> I am running complex models using rma.mv function of metafor
> (metafor_2.0-0;R version 3.4.0) on a large dataset (n = 197 studies)
> with a 4-level hierarchical structure of data.
>
>
>
> #### Model ####
>
> (tmp.casdiet <- rma.mv(MTPYMean, MTPYSEMtrDP^2, data=tmp.dat.MTPY.new,
>
>                       mods = ~
>
>                         cMPbal +
>
>                         cNELbal +
>
>                         cMPsupply.kg +
>
>                         factor(CasDiet)*cMPsupply.kg,
>
>                       random = ~1|laboratory/experiment/study,
>
>                       method = "REML", sparse=TRUE))
>
>
>
> All metafor functions run well except cooks.distance.rma.mv which is
> really slowing my work. I have a new computer that should be up to the task.
>
>
>
>
>  The time spent to execute the task  is related to the random statement:
>
> ·        random = ~1|laboratory/experiment/study : 14 min 5 sec
>
> ·        random = ~1|experiment/study : 8 min 10 sec
>
> ·        random = ~1|study: 1 min 12 sec
>
>
>
> Find below more info on variance components and Cook’s distance graphs.
>
>
>
> In this model it wouldn’t make much of a difference to run the
> cooks.distance.rma.mv function with random = ~1|study but it is not the
> correct way to detect influential cases.
>
>
>
>
> Is there another way to speed up the process ?
>
>
>
> Thanks in advance,
>
>
>
> Roger Martineau ☺
>
>
>
>
>
> The variance components and the associated Cook’s distance graphs are:
>
>
>
> Variance Components:
>
>
>
>               estim     sqrt  nlvls  fixed
>
> sigma^2.1  178.9385  13.3768     21     no
>
> sigma^2.2  409.8262  20.2442     47     no
>
> sigma^2.3    0.0000   0.0016     69     no
>
>                                 factor
>
> sigma^2.1                   laboratory
>
> sigma^2.2        laboratory/experiment
>
> sigma^2.3  laboratory/experiment/study
>
>
>
> #### Cook's distance ####
>
> par(mfrow=c(1,1))
>
> tmp.cook <- cooks.distance.rma.mv(tmp.casdiet, progbar=TRUE)
>
> plot(tmp.cook, type="o", pch=19)
>
> which(tmp.cook > 1)
>
>
>
> ·        random = ~1|laboratory/experiment/study
>
> ·        random = ~1|experiment/study
>
> ·        random = ~1|study
>
>
> <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 at r-project.org
> 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