Generates data for studentized resiudual vs leverage plot.

ols_prep_rstudlev_data(model)

Arguments

model

An object of class lm.

Examples

model <- lm(read ~ write + math + science, data = hsb) ols_prep_rstudlev_data(model)
#> $levrstud #> # A tibble: 200 x 5 #> obs leverage rstudent color fct_color #> <int> <dbl> <dbl> <chr> <ord> #> 1 1 0.0167 1.56 normal normal #> 2 2 0.0160 1.57 normal normal #> 3 3 0.0560 -0.862 leverage leverage #> 4 4 0.0133 2.13 outlier outlier #> 5 5 0.00723 -1.01 normal normal #> 6 6 0.0190 -1.55 normal normal #> 7 7 0.0282 -0.00331 normal normal #> 8 8 0.0135 -1.43 normal normal #> 9 9 0.00779 1.07 normal normal #> 10 10 0.00611 0.720 normal normal #> # ... with 190 more rows #> #> $lev_thrsh #> [1] 0.04 #> #> $minx #> [1] 0.005119677 #> #> $miny #> [1] -5.715729 #> #> $maxx #> [1] 0.07998748 #> #> $maxy #> [1] 5.355991 #>