1 min read

10. Bayesian Analysis

Bayesian regression

library(rstanarm)
options(mc.cores = parallel::detectCores())
glm1 <- stan_glmer(yield_annual ~ fertilizer_n + age + genus:fertilizer_n + genus:age + (1 | site ), #prior = normal(30, 4),
                    
                  data = grass_yields)

glm1
plot(glm1)
plot(glm1, plotfun = 'hist')
pairs(glm1)
posterior_interval(glm1)

summary(glm1)
library(sjPlot)
sjPlot::sjp.lmer(glm1)

http://topepo.github.io/caret/train-models-by-tag.html https://thinkinator.com/2016/01/12/r-users-will-now-inevitably-become-bayesians/