# NOT RUN {
if (require(rstanarm)) {
fit_bayes <- stan_glm(mpg ~ factor(cyl) * wt + qsec,
data = mtcars,
family = gaussian(),
refresh = 0)
es <- eta_squared_posterior(fit_bayes, partial = FALSE, type = 3)
print(bayestestR::describe_posterior(es))
# compare to:
if (require(car)) {
fit_freq <- lm(mpg ~ factor(cyl) * wt + qsec,
data = mtcars)
aov_table <- car::Anova(fit_freq, type = 3)
print(eta_squared(aov_table, partial = FALSE))
}
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab