Hi all,
I constructed two models and would like to compare the model fit using Bayes_factor()
.
f0_on_11_10 <- brm(fzero_onset ~ position+voicing+target_vowel+poa+
(1+position+voicing+target_vowel+poa|File.name)+
(1+position|word),
data= fzero, sample_prior = TRUE,
save_pars = save_pars(all = TRUE),
family=gaussian(),
core=8, iter=10000,warmup=1000, chains = 4,
init = 0,
control=list(adapt_delta=0.999,max_treedepth=15),
seed=1432)
f0_on_1_bo_10 <- brm(fzero_onset ~ position*voicing*target_vowel+poa+
(1+position*voicing*target_vowel+poa|File.name)+
(1+position|word),
data= fzero_bo, sample_prior = TRUE,
save_all_pars = TRUE,
family=gaussian(),
core=8, iter=10000, warmup=1000, chains = 4,
init = 0,
control=list(adapt_delta=0.999,max_treedepth=15),
seed=1432)
When I ran:
bayes_factor(f0_on_11_10,f0_on_1_bo_10 )
I keep getting:
Estimated Bayes factor in favor of f0_on_11_10 over f0_on_1_bo_10: 0.00000
Warning messages:
1: logml could not be estimated within maxiter, rerunning with adjusted starting value.
Estimate might be more variable than usual.
2: logml could not be estimated within maxiter, rerunning with adjusted starting value.
Estimate might be more variable than usual.
when revering the order of the model as in:
brms::bayes_factor(f0_on_1_bo_10,f0_on_11_10 )
I keep getting the same thing:
Estimated Bayes factor in favor of f0_on_1_bo_10 over f0_on_11_10: Inf
Warning messages:
1: logml could not be estimated within maxiter, rerunning with adjusted starting value.
Estimate might be more variable than usual.
2: logml could not be estimated within maxiter, rerunning with adjusted starting value.
Estimate might be more variable than usual.
Here is my session info, just in case it’d help:
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/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] stats graphics grDevices utils datasets methods base
other attached packages:
[1] brms_2.17.4 Rcpp_1.0.8.3 lmerTest_3.1-3 lme4_1.1-29 Matrix_1.3-4
loaded via a namespace (and not attached):
[1] TH.data_1.1-1 minqa_1.2.4 colorspace_2.0-3 ellipsis_0.3.2
[5] modeltools_0.2-23 ggridges_0.5.3 estimability_1.3 markdown_1.1
[9] base64enc_0.1-3 rstudioapi_0.13 farver_2.1.0 rstan_2.26.13
[13] DT_0.23 fansi_1.0.3 mvtnorm_1.1-3 lubridate_1.8.0
[17] diffobj_0.3.5 coin_1.4-2 bridgesampling_1.1-2 codetools_0.2-18
[21] splines_4.1.2 knitr_1.39 libcoin_1.0-9 shinythemes_1.2.0
[25] bayesplot_1.9.0 jsonlite_1.8.0 nloptr_2.0.2 shiny_1.7.1
[29] compiler_4.1.2 emmeans_1.7.4-1 backports_1.4.1 assertthat_0.2.1
[33] fastmap_1.1.0 strucchange_1.5-2 cli_3.3.0 later_1.3.0
[37] htmltools_0.5.2 prettyunits_1.1.1 tools_4.1.2 igraph_1.3.2
[41] coda_0.19-4 gtable_0.3.0 glue_1.6.2 reshape2_1.4.4
[45] dplyr_1.0.9 posterior_1.2.2 V8_4.2.0 vctrs_0.4.1
[49] nlme_3.1-153 crosstalk_1.2.0 tensorA_0.36.2 xfun_0.31
[53] stringr_1.4.0 ps_1.7.1 mime_0.12 miniUI_0.1.1.1
[57] lifecycle_1.0.1 gtools_3.9.2.2 MASS_7.3-54 zoo_1.8-10
[61] scales_1.2.0 rstanarm_2.21.3 colourpicker_1.1.1 promises_1.2.0.1
[65] Brobdingnag_1.2-7 parallel_4.1.2 sandwich_3.0-1 inline_0.3.19
[69] shinystan_2.6.0 yaml_2.3.5 curl_4.3.2 gridExtra_2.3
[73] ggplot2_3.3.6 loo_2.5.1 StanHeaders_2.26.13 stringi_1.7.6
[77] dygraphs_1.1.1.6 checkmate_2.1.0 boot_1.3-28 pkgbuild_1.3.1
[81] rlang_1.0.2 pkgconfig_2.0.3 matrixStats_0.62.0 distributional_0.3.0
[85] evaluate_0.15 lattice_0.20-45 purrr_0.3.4 rstantools_2.2.0
[89] htmlwidgets_1.5.4 processx_3.6.1 tidyselect_1.1.2 plyr_1.8.7
[93] magrittr_2.0.3 R6_2.5.1 generics_0.1.2 multcomp_1.4-19
[97] DBI_1.1.2 pillar_1.7.0 xts_0.12.1 survival_3.2-13
[101] abind_1.4-5 tibble_3.1.7 crayon_1.5.1 utf8_1.2.2
[105] party_1.3-10 rmarkdown_2.14 grid_4.1.2 callr_3.7.0
[109] threejs_0.3.3 digest_0.6.29 xtable_1.8-4 httpuv_1.6.5
[113] numDeriv_2016.8-1.1 RcppParallel_5.1.5 stats4_4.1.2 munsell_0.5.0
[117] shinyjs_2.1.0
Could anybody please advise what is going on? Am I doing something wrong?
Thanks in advance!