Generates data for standardized residual chart.

ols_prep_srchart_data(model)

Arguments

model

An object of class lm.

Examples

model <- lm(read ~ write + math + science, data = hsb) ols_prep_srchart_data(model)
#> # A tibble: 200 x 5 #> obs sdres color fct_color txt #> <int> <dbl> <chr> <ord> <int> #> 1 1 1.56 normal normal NA #> 2 2 1.56 normal normal NA #> 3 3 -0.863 normal normal NA #> 4 4 2.11 outlier outlier 4 #> 5 5 -1.01 normal normal NA #> 6 6 -1.55 normal normal NA #> 7 7 -0.00332 normal normal NA #> 8 8 -1.43 normal normal NA #> 9 9 1.07 normal normal NA #> 10 10 0.721 normal normal NA #> # ... with 190 more rows