-
Notifications
You must be signed in to change notification settings - Fork 20
/
pkgs.R
46 lines (44 loc) · 1.83 KB
/
pkgs.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## load packages
library(bookdown)
library(tidyverse)
library(brms)
library(ggsignif)
library(gridExtra)
# library(Rlab) # for dbern (used in appendix; maybe solve differently?)
library(rcartocolor) # color-blind friendly palettes: https://github.com/Nowosad/rcartocolor
library(extraDistr) # create beta-binomial and bernoulli rvs
library(boot) # bootstrapped (mainly: 95% CIs for the mean)
library(naniar) # turn numbers (e.g. -5,99,..) into NA (handling of missing values in data sets)
library(latex2exp) # for TeX in plots
library(cowplot) # to arrange plots
library(scales) # to massage scales in plots
# library(greta) # probabilistic modeling package
# library(ggmcmc) # tidy Bayes samples
# library(tidybayes) # tidy Bayes samples
# library(HDInterval) # credible intervals
library(binom) # for binomial confidence intervals
library(BSDA) # for z.test
library(polspline) # for reliable density estimates at point-values
# library(GGally) # for ally plots
# library(LaplacesDemon) # for student t-distribution with different means and SDs
library(magrittr) # more fun with pipes
library(zeallot) # unpacking / multiple assignment operator %<-%
# library(mvtnorm) # for multi-variate normal (used in lin. regression chapter)
# for visualizing dirichlet distribution;
# needs github version, see .travis.yml for that
# if (!("dirichlet" %in% installed.packages())) {
# devtools::install_github("dkahle/dirichlet")
# }
# library(dirichlet) # no longer available for R >4?
# # same/similar for aida-package:
# if (!("aida" %in% installed.packages())) {
# devtools::install_github("michael-franke/aida-package")
# }
# library(aida)
## set defaults
# source("theme_ida.R")
theme_set(
aida::theme_aida()
)
# parallel execution of Stan code
options(mc.cores = parallel::detectCores())