[R-meta] Same command works on one machine but not another

James Pustejovsky jepu@to @end|ng |rom gm@||@com
Tue Jun 8 03:19:17 CEST 2021


Hi Benoit,

I'm not sure what might be causing the issue you're encountering. I have
double-checked that all of the clubSandwich (v0.5.3) unit tests pass with
metafor 3.0-1. If you'd be willing to work up a reproducible example or
share your data with me (off-list), I can take a look and determine if
there's a bug in clubSandwich.

Kind Regards,
James

On Mon, Jun 7, 2021 at 7:33 AM Benoît Bediou <Benoit.Bediou using unige.ch> wrote:

> Dear Wolfgang
> Thank your for the quick reply
> Unfortunately specifying the clustering doesn’t work either
> However, updating metafor to 3.0-1 and downgrading club sandwich to
> version _0.5.0 did work
> Thanks so much!
> best
> ben
>
>
> > On 7 Jun 2021, at 08:23, Viechtbauer, Wolfgang (SP) <
> wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
> >
> > Dear Ben,
> >
> > I see various differences in package versions (most notably:
> clubSandwich_0.5.3 vs clubSandwich_0.5.0 and metafor_2.4-0 vs
> metafor_2.5-57).
> >
> > In any case, instead of relying on coef_test() to figure out the
> appropriate cluster variable for you, I would recommend to specify it
> manually to be on the safe side:
> >
> > CHE_model <- clubSandwich::coef_test(mlma_model, vcov = "CR2", cluster =
> es_data$Paper)
> >
> > Best,
> > Wolfgang
> >
> >> -----Original Message-----
> >> From: R-sig-meta-analysis [mailto:
> r-sig-meta-analysis-bounces using r-project.org] On
> >> Behalf Of Benoît Bediou
> >> Sent: Monday, 07 June, 2021 7:56
> >> To: r-sig-meta-analysis using r-project.org
> >> Subject: [R-meta] Same command works on one machine but not another
> >>
> >> Hi there
> >> I am facing a strange problem and would welcome some help
> >>
> >> My colleague is able to run a command that does not work on my machine
> and we
> >> haven’t been able to figure out why
> >>
> >> I am pasting below the command lines and then the sessionInfo from my
> machine and
> >> from my colleague’s
> >> Thank you so much for any help you can provide!
> >>
> >> best
> >> Ben
> >>
> >> The command is its simple as
> >>
> >> ## Multilevel model
> >> vcov_mat <- impute_covariance_matrix(es_data$g_var,
> >>                                      cluster = es_data$Paper,
> >>                                      r = 0.8)
> >> mlma_model<- metafor::rma.mv(g ~ 1, # Intercept only MLMA model
> >>                 V = vcov_mat,
> >>                 random = ~ 1 | Paper / ES_ID,# NOT WORKING WE COULD ADD
> >> COGNITIVE DOMAIN TOO!?
> >>                 # random = list(~ 1 | Paper, ~ 1 | ES_ID),#
> >>                 # random = ~ 1 | ES_ID,# WORKING
> >>                 sparse = TRUE,
> >>                 data = es_data,
> >>                 test="t")
> >> ## Add RVE using clubSandwich
> >> CHE_model <- clubSandwich::coef_test(mlma_model, vcov = "CR2")
> >>
> >>> Error in if (!all(nested)) stop("Random effects are not nested within
> >> clustering") :
> >> missing value where TRUE/FALSE needed
> >>>
> >>
> >> ## SESSION INFO --- NOT WORKING
> >> R version 4.0.4 (2021-02-15)
> >> Platform: x86_64-apple-darwin17.0 (64-bit)
> >> Running under: macOS Big Sur 10.16
> >>
> >> Matrix products: default
> >> LAPACK:
> >>
> /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
> >>
> >> locale:
> >> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
> >>
> >> attached base packages:
> >> [1] parallel  stats     graphics  grDevices utils     datasets
> methods   base
> >>
> >> other attached packages:
> >> [1] matrixStats_0.57.0 doMC_1.3.7         iterators_1.0.13
>  foreach_1.5.1
> >> partitions_1.10-2  DescTools_0.99.38  ggsci_2.9
> RColorBrewer_1.1-2
> >> plotly_4.9.2.1
> >> [10] ggthemes_4.2.0     scales_1.1.1       wesanderson_0.3.6
> ggExtra_0.9
> >> ggstatsplot_0.6.5  metafor_2.4-0      Matrix_1.3-2
>  clubSandwich_0.5.3
> >> robumeta_2.0
> >> [19] zoo_1.8-9          kableExtra_1.3.1   knitr_1.30
>  summarytools_0.9.6
> >> plyr_1.8.6         forcats_0.5.0      stringr_1.4.0      dplyr_1.0.3
> >> purrr_0.3.4
> >> [28] readr_1.4.0        tidyr_1.1.2        tibble_3.1.0
>  ggplot2_3.3.3
> >> tidyverse_1.3.0    lavaan_0.6-8       data.table_1.13.6  reshape2_1.4.4
> >> pacman_0.5.1
> >>
> >> loaded via a namespace (and not attached):
> >> [1] coda_0.19-4               multcomp_1.4-15           inline_0.3.16
> >> generics_0.1.0            callr_3.5.1               cowplot_1.1.0
> >> [7] TH.data_1.0-10            correlation_0.4.0         webshot_0.5.2
> >> xml2_1.3.2                lubridate_1.7.9.2         httpuv_1.5.4
> >> [13] StanHeaders_2.21.0-6      assertthat_0.2.1          WRS2_1.1-0
> >> xfun_0.20                 hms_0.5.3                 evaluate_0.14
> >> [19] promises_1.1.1            tidyBF_0.4.0              fansi_0.4.2
> >> dbplyr_2.0.0              readxl_1.3.1              DBI_1.1.0
> >> [25] tmvnsim_1.0-2             htmlwidgets_1.5.2         reshape_0.8.8
> >> kSamples_1.2-9            stats4_4.0.4              Rmpfr_0.8-2
> >> [31] paletteer_1.2.0           ellipsis_0.3.1
> crosstalk_1.1.0.1
> >> selectr_0.4-2             rcompanion_2.3.26         ggpubr_0.4.0
> >> [37] backports_1.2.1           V8_3.4.0                  pbivnorm_0.6.0
> >> insight_0.10.0            ggcorrplot_0.1.3          rapportools_1.0
> >> [43] RcppParallel_5.0.2        libcoin_1.0-6             vctrs_0.3.6
> >> abind_1.4-5               withr_2.4.1               pryr_0.1.4
> >> [49] metaBMA_0.6.5             bdsmatrix_1.3-4           checkmate_2.0.0
> >> prettyunits_1.1.1         fastGHQuad_1.0            mnormt_2.0.2
> >> [55] lazyeval_0.2.2            crayon_1.4.1              labeling_0.4.2
> >> pkgconfig_2.0.3           SuppDists_1.1-9.5         nlme_3.1-152
> >> [61] statsExpressions_0.6.0    rematch_1.0.1             rlang_0.4.10
> >> lifecycle_1.0.0           miniUI_0.1.1.1            LaplacesDemon_16.1.4
> >> [67] MatrixModels_0.4-1        sandwich_3.0-1            mathjaxr_1.0-1
> >> EMT_1.1                   modelr_0.1.8              cellranger_1.1.0
> >> [73] tcltk_4.0.4               broomExtra_4.1.0          lmtest_0.9-38
> >> loo_2.3.1                 mc2d_0.1-18               carData_3.0-4
> >> [79] boot_1.3-26               reprex_0.3.0              base64enc_0.1-3
> >> processx_3.4.5            viridisLite_0.3.0         PMCMRplus_1.7.0
> >> [85] parameters_0.9.0          rootSolve_1.8.2.1         debugme_1.1.0
> >> pander_0.6.3              multcompView_0.1-8        coin_1.3-1
> >> [91] rstatix_0.6.0             ggsignif_0.6.0            memoise_1.1.0
> >> magrittr_2.0.1            compiler_4.0.4            rstantools_2.1.1
> >> [97] bbmle_1.0.23.1            lme4_1.1-25               cli_2.3.1
> >> pbapply_1.4-3             ps_1.5.0                  TMB_1.7.18
> >> [103] Brobdingnag_1.2-6         MASS_7.3-53               mgcv_1.8-33
> >> tidyselect_1.1.0          stringi_1.5.3             highr_0.8
> >> [109] yaml_2.2.1                ggrepel_0.8.2
>  bridgesampling_1.0-0
> >> grid_4.0.4                polynom_1.4-0             tools_4.0.4
> >> [115] lmom_2.8                  rio_0.5.16
> rstudioapi_0.13
> >> foreign_0.8-81            gridExtra_2.3             ipmisc_4.1.0
> >> [121] gld_2.6.2                 pairwiseComparisons_3.1.0 farver_2.1.0
> >> RcppZiggurat_0.1.6        digest_0.6.27             shiny_1.5.0
> >> [127] nortest_1.0-4             BWStest_0.2.2             Rcpp_1.0.6
> >> car_3.0-10                broom_0.7.3.9000          ez_4.4-0
> >> [133] BayesFactor_0.9.12-4.2    performance_0.5.1
>  metaplus_0.7-11
> >> later_1.1.0.1             httr_1.4.2                rsconnect_0.8.16
> >> [139] effectsize_0.4.0          colorspace_2.0-0          rvest_0.3.6
> >> fs_1.5.0                  splines_4.0.4             statmod_1.4.35
> >> [145] rematch2_2.1.2            expm_0.999-5              Exact_2.1
> >> xtable_1.8-4              gmp_0.6-1                 jsonlite_1.7.2
> >> [151] nloptr_1.2.2.2            rstan_2.21.2              Rfast_2.0.1
> >> zeallot_0.1.0             modeltools_0.2-23         R6_2.5.0
> >> [157] broom.mixed_0.2.6         pillar_1.5.1
> htmltools_0.5.1
> >> mime_0.9                  DT_0.16                   glue_1.4.2
> >> [163] fastmap_1.0.1             minqa_1.2.4               class_7.3-18
> >> codetools_0.2-18          pkgbuild_1.2.0            mvtnorm_1.1-1
> >> [169] utf8_1.2.1                lattice_0.20-41
>  numDeriv_2016.8-1.1
> >> curl_4.3                  gtools_3.8.2              magick_2.5.2
> >> [175] logspline_2.1.16          zip_2.1.1                 openxlsx_4.2.3
> >> survival_3.2-7            rmarkdown_2.6             munsell_0.5.0
> >> [181] e1071_1.7-4               haven_2.3.1               gtable_0.3.0
> >> bayestestR_0.7.5
> >>
> >> ## SESSION INFO — WORKING MACHINE
> >> R version 4.0.2 (2020-06-22)
> >> Platform: x86_64-w64-mingw32/x64 (64-bit)
> >> Running under: Windows >= 8 x64 (build 9200)
> >>
> >> Matrix products: default
> >>
> >> locale:
> >> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
> >> LC_MONETARY=English_United States.1252 LC_NUMERIC=C
> >> [5] LC_TIME=English_United States.1252
> >>
> >> attached base packages:
> >> [1] stats     graphics  grDevices utils     datasets  methods   base
> >>
> >> other attached packages:
> >> [1] DescTools_0.99.37  ggsci_2.9          RColorBrewer_1.1-2
> plotly_4.9.3
> >> ggthemes_4.2.0     scales_1.1.1       wesanderson_0.3.6  ggExtra_0.9
> >> [9] ggstatsplot_0.7.1  metafor_2.5-57     Matrix_1.2-18
> clubSandwich_0.5.0
> >> robumeta_2.0       zoo_1.8-8          kableExtra_1.1.0   knitr_1.29
> >> [17] summarytools_0.9.6 plyr_1.8.6         forcats_0.5.0
> stringr_1.4.0
> >> dplyr_1.0.0        purrr_0.3.4        readr_1.3.1        tidyr_1.1.0
> >> [25] tibble_3.0.3       ggplot2_3.3.3      tidyverse_1.3.0
> lavaan_0.6-8
> >> data.table_1.13.0  reshape2_1.4.4     pacman_0.5.1
> >>
> >> loaded via a namespace (and not attached):
> >> [1] readxl_1.3.1              pairwiseComparisons_3.1.3 backports_1.1.8
> >> selectr_0.4-2             lazyeval_0.2.2            splines_4.0.2
> >> [7] gmp_0.6-2                 kSamples_1.2-9            ipmisc_6.0.0
> >> pryr_0.1.4                digest_0.6.25             SuppDists_1.1-9.5
> >> [13] htmltools_0.5.0           magick_2.5.0              fansi_0.4.1
> >> magrittr_1.5              checkmate_2.0.0           memoise_2.0.0
> >> [19] paletteer_1.3.0           modelr_0.1.8
> matrixStats_0.57.0
> >> sandwich_2.5-1            colorspace_1.4-1          blob_1.2.1
> >> [25] rvest_0.3.6               ggrepel_0.8.2             haven_2.3.1
> >> xfun_0.16                 tcltk_4.0.2               crayon_1.3.4
> >> [31] jsonlite_1.7.0            Exact_2.0                 zeallot_0.1.0
> >> glue_1.4.1                gtable_0.3.0              webshot_0.5.2
> >> [37] MatrixModels_0.4-1        statsExpressions_1.0.0    Rmpfr_0.8-3
> >> rapportools_1.0           mvtnorm_1.1-1             DBI_1.1.0
> >> [43] PMCMRplus_1.9.0           miniUI_0.1.1.1            Rcpp_1.0.5
> >> viridisLite_0.3.0         xtable_1.8-4              performance_0.4.8
> >> [49] tmvnsim_1.0-2             stats4_4.0.2
> htmlwidgets_1.5.3
> >> httr_1.4.2                ellipsis_0.3.1            farver_2.0.3
> >> [55] pkgconfig_2.0.3           reshape_0.8.8
>  multcompView_0.1-8
> >> dbplyr_1.4.4              labeling_0.3              tidyselect_1.1.0
> >> [61] rlang_0.4.7               later_1.1.0.1
>  ggcorrplot_0.1.3
> >> effectsize_0.4.4          munsell_0.5.0             cellranger_1.1.0
> >> [67] tools_4.0.2               cachem_1.0.4              cli_2.0.2
> >> generics_0.0.2            broom_0.7.5               mathjaxr_1.0-1
> >> [73] evaluate_0.14             fastmap_1.0.1             BWStest_0.2.2
> >> yaml_2.2.1                rematch2_2.1.2            fs_1.4.2
> >> [79] pander_0.6.3              WRS2_1.1-1                pbapply_1.4-3
> >> nlme_3.1-148              mime_0.9                  xml2_1.3.2
> >> [85] correlation_0.6.0         compiler_4.0.2            rstudioapi_0.11
> >> ggsignif_0.6.1            reprex_0.3.0              pbivnorm_0.6.0
> >> [91] stringi_1.4.6             highr_0.8
>  parameters_0.12.0
> >> lattice_0.20-41           vctrs_0.3.2               pillar_1.4.6
> >> [97] lifecycle_0.2.0           mc2d_0.1-18               insight_0.13.2
> >> httpuv_1.5.4              patchwork_1.1.1           R6_2.4.1
> >> [103] promises_1.1.1            BayesFactor_0.9.12-4.2
> codetools_0.2-16
> >> boot_1.3-25               MASS_7.3-51.6             gtools_3.8.2
> >> [109] assertthat_0.2.1          withr_2.2.0               mnormt_2.0.1
> >> expm_0.999-5              mgcv_1.8-31               bayestestR_0.8.2
> >> [115] parallel_4.0.2            hms_0.5.3                 grid_4.0.2
> >> coda_0.19-3               rmarkdown_2.3             shiny_1.5.0
> >> [121] lubridate_1.7.9           base64enc_0.1-3
>
> _______________________________________________
> R-sig-meta-analysis mailing list
> R-sig-meta-analysis using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
>

	[[alternative HTML version deleted]]



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