# 2.see包用法概览 --------------------------------------------------------------
#英文教程原网址:https://easystats.github.io/see/
library(tidyverse)
library(easystats)
rm(list = ls())
options(stringsAsFactors = T)
#总体步骤
# Fitting a model.
# Extracting desired results from the model and arranging them into a dataframe.
# Passing the results dataframe to ggplot() and specifying the graphical parameters
#拟合线性模型并对回归系数进行可视化
model <- lm(wt ~ am * cyl, data = mtcars)
plot(parameters(model))
#利用ggplot2语法进行定制化
plot(parameters(model)) +
ggplot2::labs(title = "A Dot-and-Whisker Plot")
#进行正态性检验并绘图
model <- lm(wt ~ mpg, data = mtcars)
check <- check_normality(model)
plot(check, type = "qq")
#对方差分析结果可视化
model <- aov(wt ~ am * cyl, data = mtcars)
plot(omega_squared(model))