[R-meta] error installing devel version of metafor

Viechtbauer, Wolfgang (SP) wolfg@ng@viechtb@uer @ending from m@@@trichtuniver@ity@nl
Fri Nov 16 15:08:42 CET 2018


I can't really help on the devtools issue.

As for the error you get when trying to run cooks.distance() (you don't have to call cooks.distance.rma.mv() explicitly -- the 'dispatch' from cooks.distance() to cooks.distance.rma.mv() happens automatically): Did you fit 'modRE_6' with an older version of metafor? Then try refitting it with the current version first.

If model fitting is slow and hence cooks.distance() is also very slow, you could use 'reestimate=TRUE'. That should speed things up a lot. See help(cooks.distance.rma.mv) and the 'Note' section.

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Gram, Gil (IITA)
Sent: Thursday, 15 November, 2018 12:18
To: r-sig-meta-analysis using r-project.org
Subject: Re: [R-meta] error installing devel version of metafor

Hi Wolfgang,

It indeed seems to be not related to metafor, as it also doesn’t work for another package I tried. Have been trying to figure out the problem, but couldn’t find much (specific) help. I downloaded therefore the dev package metafor-master manually from https://github.com/wviechtb/metafor, and installed/loaded it as shown below. Two questions:
(1) I could not run cooks.distance.rma.mv() because of a new error (see below)
(2) profile.rma.mv() had a similar problem as cd with the 2.0-0 version, i.e. it was running for days without showing signs of progress. You think this should also go faster with the dev version 2.1-0?

install.packages("devtools")
library('devtools')
install('/Library/Frameworks/R.framework/Versions/3.5/Resources/library/metafor-master')
library('metafor’)

> packageVersion("metafor")
[1] '2.1.0'

> class(modRE_6)
[1] "rma.mv" “rma”
> summary(modRE_6)
Multivariate Meta-Analysis Model (k = 5130; method: REML)
…
coefficients 1:30
…

> cooks.distance.rma.mv(modRE_6, progbar=T)
Error in seq_len(x$k.all) :
  argument must be coercible to non-negative integer
In addition: Warning message:
In seq_len(x$k.all) : first element used of 'length.out' argument

Your help is appreciated.

Gil Gram
PhD researcher  |  Natural resource management/CCAFS
International Institute of Tropical Agriculture (IITA)
East African Hub/Kampala/Country office
Address: IITA-Uganda Plot 15B, Naguru East Road. P.O Box 7878, Kampala
Mobile: +256 755 315236  |  Belgium Mobile: +32 484 981200
Skype: gil.gram

On 14 Nov 2018, at 18:53, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl<mailto:wolfgang.viechtbauer using maastrichtuniversity.nl>> wrote:

Dear Gil,

This doesn't look like it is related to metafor per se. Can you install other packages via install_github()? Have you tried updating devtools (in case it is not the newest version)?

Best,
Wolfgang

-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Gram, Gil (IITA)
Sent: Tuesday, 13 November, 2018 8:43
To: r-sig-meta-analysis using r-project.org<mailto:r-sig-meta-analysis using r-project.org>
Subject: [R-meta] error installing devel version of metafor

Dear community and Wolfgang,

I’m trying to compute the cook’s distances for my pretty complex rma.mv model (for context, running the model with sparse=TRUE still takes about 12 hours). However, after a few days still at 0% I assume it’s not going well. I read that cooks.distance.rma.mv is indeed slow on complex models (https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2017-August/000122.html) and Wolfgang suggested to install the devel version of metafor with install.packages("devtools") and devtools::install_github("wviechtb/metafor”). Unfortunately I get the following error: “> devtools::install_github("wviechtb/metafor")
Downloading GitHub repo wviechtb/metafor using master tar: Failed to set default locale tar: Failed to set default locale During startup - Warning messages: 1: Setting LC_CTYPE failed, using "C" 2: Setting LC_TIME failed, using "C" 3: Setting LC_MESSAGES failed, using "C" 4: Setting LC_MONETARY failed, using "C" v checking for file '/private/var/folders/wz/t5wd352s5wl7tz7crj5r3ddr0000gn/T/Rtmp8x3jdd/remotesfda76b9f309/wviechtb-metafor-e153805/DESCRIPTION' ... - preparing 'metafor': v checking DESCRIPTION meta-information ... - checking for LF line-endings in source and make files and shell scripts - checking for empty or unneeded directories - looking to see if a 'data/datalist' file should be added - building 'metafor_2.1-0.tar.gz'

Error: (converted from warning) Setting LC_CTYPE failed, using "C"
Execution halted Error in i.p(...) : (converted from warning) installation of package '/var/folders/wz/t5wd352s5wl7tz7crj5r3ddr0000gn/T//Rtmp8x3jdd/filefda18e204cb/metafor_2.1-0.tar.gz' had non-zero exit status”

Tried to look for other ways of installing it, but in vain. Hope someone can help with this? Not sure what other information I should provide...

thanks!
Gil


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