Please make sure you have the latest version of R (4.4.0) installed from CRAN.
The RStudio interface is strongly recommended; you can download it here (get the free Desktop version).
Install primary GLMM-fitting packages (and a variety of extras). Note that this list deliberately takes an everything-but-the-kitchen-sink approach, since it will save time to have everything you might want installed in advance. If you have questions or problems, please contact me before the workshop.
## modeling packages
mod_pkgs <- c("bbmle", "blme", "brms", "gamm4", "glmmLasso", "glmmML", "GLMMadaptive",
"glmmTMB", "lme4", "MCMCglmm", "robustlmm", "rstanarm", "RTMB", "spaMM", "buildmer")
## miscellaneous/data manipulation
data_pkgs <- c("rbenchmark", "brglm", "devtools", "emdbook", "MEMSS",
"plyr", "remotes", "reshape2", "SASmixed", "tidyverse")
## model processing/diagnostics/reporting
diag_pkgs <- c("afex", "agridat", "AICcmodavg", "aods3", "arm",
"broom", "broom.mixed", "cAIC4", "car", "coda", "DHARMa",
"effects", "emmeans", "HLMdiag", "Hmisc", "lmerTest", "multcomp",
"MuMIn", "pbkrtest", "performance", "RLRsim", "rockchalk", "sjPlot",
"sjstats", "stargazer", "texreg", "tidybayes",
"bayesplot", "posterior", "bayestestR")
## graphics
graph_pkgs <- c("cowplot", "directlabels",
## "dotwhisker",
"GGally", "ggalt", "ggplot2",
"ggpubr", "ggstance", "gridExtra", "plotMCMC",
"plotrix", "see", "viridis")
all_pkgs <- c(mod_pkgs,data_pkgs,diag_pkgs,graph_pkgs)
if (!require("pak")) {
install.packages("pak")
}
pak::pkg_install(all_pkgs)
## these are currently (temporarily) not on CRAN, or binaries aren't there
github_pkgs <- c("leeper/prediction", "leeper/margins", "fsolt/dotwhisker")
for (p in github_pkgs) remotes::install_github(p)
## get INLA (optional!)
## if (!require("BiocManager", quietly = TRUE))
## install.packages("BiocManager")
## BiocManager::install(c("Rgraphviz", "graph"), update = FALSE)
## options(timeout=300)
## install.packages("INLA",repos=c(getOption("repos"),INLA="https://inla.r-inla-download.org/R/stable"), dep=TRUE)
There is no need to (re)install packages such as grid
,
nlme
, MASS
, mgcv
, as they come
with a standard R installation.
brms
package for Bayesian
computation, we will need compilers installed as well:Because brms is based on Stan, a C++ compiler is required. The program Rtools (available on https://cran.r-project.org/bin/windows/Rtools/) comes with a C++ compiler for Windows. On Mac, you should install Xcode. For further instructions on how to get the compilers running, see the prerequisites section on https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started.
rstan
(install.packages("rstan")
)cmdstanr
From https://mc-stan.org/cmdstanr/articles/cmdstanr.html:while (!require("cmdstanr")) {
install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos", "https://cloud.r-project.org")))
}
check_cmdstan_toolchain(fix = TRUE, quiet = TRUE)
Last updated: 2024-05-11 11:12:41.47272