I'm running a series of gam models using mgcv, and one of them just silently crashes the current R session. Just to give you an idea of the structure (three different subsets run fine):
mod3p_ld1_f_v = gam(prob ~
s(LD1, k=5) +
s(species, bs="mrf", xt=list(penalty=phylo_penalty)),
family = betar(link = "logit"),
method="REML",
data=data_anc_fit[subset=="ld1_f_v"]
)
I'm not sure how I would debug this, since there is no error message. I'm happy to share the data though for you to reproduce what happened.
> sessionInfo()
R version 4.4.2 (2024-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26100)
Matrix products: default
locale:
[1] LC_COLLATE=English_Germany.utf8 LC_CTYPE=English_Germany.utf8 LC_MONETARY=English_Germany.utf8 LC_NUMERIC=C LC_TIME=English_Germany.utf8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] mvMORPH_1.2.1 subplex_1.9 corpcor_1.6.10 ggtree_3.14.0 phytools_2.4-4 maps_3.4.2.1 ape_5.8-1 lmerTest_3.1-3 lme4_1.1-37 Matrix_1.7-1 sjPlot_2.8.17
[12] MRFtools_0.0-2 caret_7.0-1 lattice_0.22-6 AICcmodavg_2.3-4 factoextra_1.0.7 FactoMineR_2.11 gratia_0.10.0 mgcv_1.9-1 nlme_3.1-166 scales_1.3.0 corrplot_0.95
[23] egg_0.4.5 gridExtra_2.3 ggimage_0.3.3 plotly_4.10.4 pals_1.10 ggnewscale_0.5.1 ggridges_0.5.6 cowplot_1.1.3 googlesheets4_1.1.1 stringi_1.8.7 moments_0.14.1
[34] reshape_0.8.9 lubridate_1.9.4 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.4 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.2 tidyverse_2.0.0
[45] MASS_7.3-61 terra_1.8-42 data.table_1.17.0 pacman_0.5.1
loaded via a namespace (and not attached):
[1] splines_4.4.2 ggplotify_0.1.2 cellranger_1.1.0 datawizard_1.0.2 hardhat_1.4.1 pROC_1.18.5 rpart_4.1.23 lifecycle_1.0.4 Rdpack_2.6.4
[10] sf_1.0-20 pbmcapply_1.5.1 doParallel_1.0.17 globals_0.16.3 insight_1.1.0 flashClust_1.01-2 magrittr_2.0.3 remotes_2.5.0 spam_2.11-1
[19] mapproj_1.2.11 DBI_1.2.3 minqa_1.2.8 multcomp_1.4-28 quadprog_1.5-8 expm_1.0-0 yulab.utils_0.2.0 nnet_7.3-19 TH.data_1.1-3
[28] sandwich_3.1-1 ipred_0.9-15 lava_1.8.1 ggrepel_0.9.6 listenv_0.9.1 tidytree_0.4.6 units_0.8-7 performance_0.13.0 parallelly_1.43.0
[37] codetools_0.2-20 DT_0.33 tidyselect_1.2.1 aplot_0.2.5 ggeffects_2.2.1 farver_2.1.2 stats4_4.4.2 googledrive_2.1.1 jsonlite_2.0.0
[46] glassoFast_1.0.1 e1071_1.7-16 survival_3.7-0 iterators_1.0.14 emmeans_1.11.0 foreach_1.5.2 tools_4.4.2 treeio_1.30.0 Rcpp_1.0.14
[55] glue_1.8.0 mnormt_2.1.1 prodlim_2024.06.25 xfun_0.52 mvnfast_0.2.8 numDeriv_2016.8-1.1 withr_3.0.2 combinat_0.0-8 fastmap_1.2.0
[64] boot_1.3-31 digest_0.6.37 timechange_0.3.0 R6_2.6.1 gridGraphics_0.5-1 estimability_1.5.1 colorspace_2.1-1 dichromat_2.0-0.1 generics_0.1.3
[73] recipes_1.2.1 clusterGeneration_1.3.8 class_7.3-22 httr_1.4.7 htmlwidgets_1.6.4 scatterplot3d_0.3-44 ModelMetrics_1.2.2.2 pkgconfig_2.0.3 gtable_0.3.6
[82] timeDate_4041.110 htmltools_0.5.8.1 dotCall64_1.2 multcompView_0.1-10 leaps_3.2 gower_1.0.2 reformulas_0.4.0 ggfun_0.1.8 knitr_1.50
[91] rstudioapi_0.17.1 tzdb_0.5.0 reshape2_1.4.4 coda_0.19-4.1 curl_6.2.2 nloptr_2.2.1 proxy_0.4-27 zoo_1.8-14 DEoptim_2.2-8
[100] sjlabelled_1.2.0 KernSmooth_2.23-24 parallel_4.4.2 pillar_1.10.2 grid_4.4.2 vctrs_0.6.5 VGAM_1.1-13 xtable_1.8-4 cluster_2.1.6
[109] evaluate_1.0.3 magick_2.8.6 mvtnorm_1.3-3 cli_3.6.4 compiler_4.4.2 rlang_1.1.6 future.apply_1.11.3 classInt_0.4-11 plyr_1.8.9
[118] sjmisc_2.8.10 fs_1.6.6 viridisLite_0.4.2 munsell_0.5.1 optimParallel_1.0-2 lazyeval_0.2.2 sjstats_0.19.0 hms_1.1.3 patchwork_1.3.0
[127] unmarked_1.5.0 future_1.40.0 rbibutils_2.3 igraph_2.1.4 gargle_1.5.2 phangorn_2.12.1 fastmatch_1.1-6 ggokabeito_0.1.0
I'm running a series of
gammodels using mgcv, and one of them just silently crashes the current R session. Just to give you an idea of the structure (three different subsets run fine):I'm not sure how I would debug this, since there is no error message. I'm happy to share the data though for you to reproduce what happened.