[R] How to Save the residuals of an LM object greater or less than a certin value to an R object?

faiz rasool faiz7r at gmail.com
Fri Feb 23 05:09:49 CET 2018

Dear list members,

I want to  save residuals above or less than a certain value to an R
object. I have performed a multiple linear regression, and now I want
to find out which cases have a residual of above + 2.5 and – 2.5.

Below I provide the R  commands I have used.

Reg<-lm(a~b+c+d+e+f) # perform multiple regression with a as the
dependent variable.

Residuals<-residuals(reg) # store residuals to an R object.
stdresiduals<-rstandard(reg) #save the standardized residuals.
#now I want to type a  command that will save the residuals  of
certain range to an object.

I realize that by plotting  the data I can quickly  see the  residuals
outside a certain boundtry, however, I am totally blind, so visually
inspecting the plot is not possible for me.

Thank you for any help.


More information about the R-help mailing list