R Markdown

Tutorials used https://ourcodingclub.github.io/tutorials/mixed-models/, https://ase.tufts.edu/bugs/guide/assets/mixed_model_guide.html, https://strengejacke.wordpress.com/2014/10/26/visualizing-generalized-linear-mixed-effects-models-with-ggplot-rstats-lme4/

##   Mouse.. observer Section Islet.. Score group
## 1      96   khaled       1       1     1    wt
## 2      96    katie       3       1     1    wt
## 3      96    katie       2       7     4    wt
## 4      96   khaled       1       6     4    wt
## 5      96   khaled       3       3     4    wt
## 6      96   khaled       1       2     1    wt

Show model

lmm <- lme4::lmer(Score ~ group + (1 | Mouse../Islet../Section) + (1 | observer), data = islet_grades,
    REML = TRUE)
## boundary (singular) fit: see ?isSingular
stargazer::stargazer(lmm, type = "text",
          digits = 3,
          star.cutoffs = c(0.05, 0.01, 0.001),
          digit.separator = "")
## 
## =================================================
##                          Dependent variable:     
##                     -----------------------------
##                                 Score            
## -------------------------------------------------
## grouphet                       -0.647*           
##                                (0.328)           
##                                                  
## groupko                        -0.364            
##                                (0.247)           
##                                                  
## Constant                      3.132***           
##                                (0.549)           
##                                                  
## -------------------------------------------------
## Observations                     980             
## Log Likelihood                -1371.417          
## Akaike Inf. Crit.             2758.833           
## Bayesian Inf. Crit.           2797.934           
## =================================================
## Note:               *p<0.05; **p<0.01; ***p<0.001
sessionInfo()
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS  10.16
## 
## Matrix products: default
## BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.6/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     
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.8      knitr_1.37      magrittr_2.0.1  splines_3.6.1  
##  [5] MASS_7.3-55     lattice_0.20-45 R6_2.5.1        rlang_0.4.12   
##  [9] fastmap_1.1.0   minqa_1.2.4     stringr_1.4.0   tools_3.6.1    
## [13] grid_3.6.1      nlme_3.1-155    xfun_0.29       stargazer_5.2.2
## [17] jquerylib_0.1.4 htmltools_0.5.2 yaml_2.2.1      lme4_1.1-27.1  
## [21] digest_0.6.29   Matrix_1.3-4    nloptr_1.2.2.3  sass_0.4.0     
## [25] evaluate_0.14   rmarkdown_2.11  stringi_1.7.6   compiler_3.6.1 
## [29] bslib_0.3.1     boot_1.3-28     jsonlite_1.7.2