# NOT RUN {
data(efc)
# fit model
fit <- lm(neg_c_7 ~ c12hour + e17age + e42dep, data = efc)
# plot residuals for all independent variables
sjp.resid(fit)
# remove some independent variables from output
sjp.resid(fit, remove.estimates = c("e17age", "e42dep"))
# show pattern
sjp.resid(fit, remove.estimates = c("e17age", "e42dep"))$pattern
# }
Run the code above in your browser using DataLab