res_3: res_3

Description Usage Arguments Value Examples

View source: R/res_3.R

Description

res_3 computes three types of residuals from a linear regression model. These residual types are standardized resisuals, internally studentized residuals, and externally studentized residuals.

Usage

1
res_3(input_data, fit.model ,r = c("z", "int", "ex"))

Arguments

input_data

a data frame containing the variables in th model

fit.model

an R object, returned by lm

r

what type of resisuals will be computed: "z" is standardized resisuals, "int" is internally studentized resisuals, and "ex" is externally studentized resisuals

Value

if standardized resisuals are computed, a list of two elements will be returned

Examples

1
2
3
res_3(demo_data, lm(fev~A+H+M+S, data = demo_data), r = "z")
res_3(demo_data, lm(fev~A+H+M+S, data = demo_data), r = "int")
res_3(demo_data, lm(fev~A+H+M+S, data = demo_data), r = "ex")

Jiaxin-Cara-Qian/testpackage documentation built on Dec. 18, 2021, 1:30 a.m.