Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Warning: Inner iterations did not coverge and an advise about model structure  #36

@dariober

Description

@dariober

Hello- I have two loosely related question maybe you can help. A bit of background:

I have data about the forms that a parasite can take in infected mice, so each datapoint is a parasite. Parasites are collected within mice, and mice within experiments. Each mouse is infected with one of four lines of parasites. The question of interest is the effect of parasite line on the proportion of the three forms accounting for the effect of mouse and experiments. In particular, I'm interested in the difference between the WT line and each of the three KO lines. This is a summary of number of mice, lines and experiments:

           Line
 Experiment KO_1 KO_3 KO_7 WT
          A    0    3    0  3
          B    0    3    0  2
          C    0    0    3  3
          D    3    0    3  3
          E    3    0    3  3

The model I have is:

bfitu <- mblogit(Form ~ Line, random=list(~1|Experiment/mouse_id), data=lldat)
emmeans::emmeans(bfitu, ~ Line | Form)

This gives sensible results but I get the warnings below. Should I be worried about them?

Warning: Inner iterations did not coverge - nlminb message: false convergence (8)

Iteration 1 - deviance = 12516.11 - criterion = 0.9603497Warning: Inner iterations did not coverge - nlminb message: false convergence (8)

Iteration 2 - deviance = 12430.75 - criterion = 0.05545146Warning: Inner iterations did not coverge - nlminb message: false convergence (8)

Iteration 3 - deviance = 12421.89 - criterion = 0.01194718Warning: Inner iterations did not coverge - nlminb message: false convergence (8)

Iteration 4 - deviance = 12420.05 - criterion = 0.001537364Warning: Inner iterations did not coverge - nlminb message: false convergence (8)

Iteration 5 - deviance = 12419.78 - criterion = 2.682554e-05Warning: Inner iterations did not coverge - nlminb message: false convergence (8)

Iteration 6 - deviance = 12419.75 - criterion = 6.59256e-09
converged

Second question: I'm not entirely sure that a more appropriate model would be:

bfitu2 <- mblogit(Form ~ Line, random=list(~1|Experiment, ~1|mouse_id), data=lldat)

any advise on this would be much appreciated.

The dataset is attached (data.tsv.gz)

Thanks for the great package!


sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: Ubuntu 22.04.3 LTS

Matrix products: default
BLAS/LAPACK: /home/dario/miniforge3/envs/20240220_multinomial/lib/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_GB.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_GB.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_GB.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/London
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggbeeswarm_0.7.2   emmeans_1.10.0     mclogit_0.9.6      Matrix_1.6-5      
[5] nnet_7.3-19        ggplot2_3.4.4      data.table_1.14.10

loaded via a namespace (and not attached):
 [1] gtable_0.3.4       jsonlite_1.8.8     dplyr_1.1.4        compiler_4.3.2    
 [5] tidyselect_1.2.0   scales_1.3.0       yaml_2.3.8         lattice_0.22-5    
 [9] coda_0.19-4.1      R6_2.5.1           generics_0.1.3     MASS_7.3-60       
[13] tibble_3.2.1       munsell_0.5.0      pillar_1.9.0       rlang_1.1.3       
[17] utf8_1.2.4         estimability_1.4.1 cli_3.6.2          withr_3.0.0       
[21] magrittr_2.0.3     grid_4.3.2         mvtnorm_1.2-4      xtable_1.8-4      
[25] memisc_0.99.31.7   beeswarm_0.4.0     lifecycle_1.0.4    vipor_0.4.7       
[29] vctrs_0.6.5        glue_1.7.0         farver_2.1.1       fansi_1.0.6       
[33] colorspace_2.1-0   tools_4.3.2        pkgconfig_2.0.3   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions