easystats生态之see包,可视化统计分析的一切

# 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")
可以用ggplot语法定制作图
#进行正态性检验并绘图
model <- lm(wt ~ mpg, data = mtcars)
check <- check_normality(model)
plot(check, type = "qq")
qq图
#对方差分析结果可视化
model <- aov(wt ~ am * cyl, data = mtcars)
plot(omega_squared(model))

方差分析结果

你可能感兴趣的:(easystats生态之see包,可视化统计分析的一切)