About the Material
This site serves as a compendium of teaching and coding material that I developed along the last couple of years. The material is based on text books (references will be given), websites (e.g., https://stats.stackexchange.com/), AI tools (e.g., ChatGPT, Blackbox AI). Many of the materials are also available as a Revealjs presentation that I usually use in teaching.
Used Software
Package Overview
The majority of the provided code is from the statistical software (R Core Team, 2024). Below, I list the packages I use most frequently, along with their respective versions.
- base (v4.4.1, R Core Team, 2024)
- pak (v0.8.0, Csárdi & Hester, 2024)
- quarto (v1.4.4, Allaire & Dervieux, 2024)
- rmarkdown (v2.27, Allaire et al., 2024)
- knitr (v1.47, Xie, 2023)
- devtools (v2.4.5, Wickham et al., 2022)
- haven (v2.5.4, Wickham, Miller, et al., 2023)
- renv (v1.0.9, Ushey & Wickham, 2024)
- stringr (v1.5.1, Wickham, 2023)
- dplyr (v1.1.4, Wickham, François, et al., 2023)
- moments (v0.14.1, Komsta & Novomestky, 2022)
- psych (v2.4.6.26, Revelle, 2024)
- lme4 (v1.1.35.4, Bates et al., 2024)
- merTools (v0.6.2, Knowles & Frederick, 2024)
- mice (v3.16.0, van Buuren & Groothuis-Oudshoorn, 2023)
- lavaan (v0.6.18, Rosseel et al., 2023)
- kableExtra (v1.4.0, Zhu, 2024)
- flextable (v0.9.6, Gohel & Skintzos, 2024)
- ggplot2 (v3.5.1, Wickham, Chang, et al., 2023)
Installation
Before installing the packages, install the pak
package (Csárdi & Hester, 2024). The pak
package is desinged to overcome some limitations of the install.packages()
function and makes package management in R
more reliable.
install.packages("pak", dependencies = TRUE)
To install the packages, run one of the following code snippets.
How I generated the code
myPks <- c('devtools@2.4.5', 'dplyr@1.1.4', 'flextable@0.9.6', 'ggplot2@3.5.1',
'haven@2.5.4', 'kableExtra@1.4.0', 'knitr@1.47', 'lavaan@0.6-18',
'lme4@1.1-35.4', 'merTools@0.6.2', 'mice@3.16.0', 'moments@0.14.1',
'pak@0.8.0', 'psych@2.4.6.26', 'quarto@1.4.4', 'renv@1.0.9', 'rmarkdown@2.27',
'stringr@1.5.1')
pak::pkg_install(pkg = myPks, upgrade = FALSE)
pak::pkg_install(pkg = pkgList, upgrade = TRUE)
Disclaimer
All material is licensed under the MIT License (MIT) and comes with ABSOLUTELY NO WARRANTY.
The MIT License
Copyright (c) 2023
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Bugs & Errors
Found errors or any bugs? Please send me an email ✉ or report them directly to github.com. At every page, below the table of contents, there is link to the repository of the website. If you think your issue may important for others, please use this option.