residuals_test | R Documentation |
Applies a Shapiro-Wilks test to a numeric vector, and returns a list with the statistic W, its p-value, and a character string with the interpretation.
residuals_test(residuals)
residuals |
Numeric vector, model residuals. |
A list with four slots:
/item w
W statistic returned by shapiro.test()
.
/item p.value
p-value of the Shapiro test.
/item interpretation
Character vector, one of "x is normal", "x is not normal".
/item plot
A patchwork plot with the qq plot and the histogram of x.
ggplot
,aes
,geom_qq_line
,ggtheme
,labs
,geom_freqpoly
,geom_abline
plot_annotation
if(interactive()){ residuals_test(residuals = runif(100)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.