# 2.see包用法概覽 --------------------------------------------------------------
#英文教程原網(wǎng)址: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
#擬合線性模型并對回歸系數(shù)進(jìn)行可視化
model <- lm(wt ~ am * cyl, data = mtcars)
plot(parameters(model))
回歸系數(shù)的可視化
#利用ggplot2語法進(jìn)行定制化
plot(parameters(model)) +
ggplot2::labs(title = "A Dot-and-Whisker Plot")
可以用ggplot語法定制作圖
#進(jìn)行正態(tài)性檢驗(yàn)并繪圖
model <- lm(wt ~ mpg, data = mtcars)
check <- check_normality(model)
plot(check, type = "qq")
qq圖
#對方差分析結(jié)果可視化
model <- aov(wt ~ am * cyl, data = mtcars)
plot(omega_squared(model))