R/resid.R

Defines functions resid.linreg

Documented in resid.linreg

resid.linreg <- function(formula, data) {
  #' Method resid.linreg
  #'
  #' @export resid.linreg
  #' @param l_full_linreg The full output of the linear regression model.
  #'
  #' @return The residuals of the linear regression analysis of the input data
  #' @examples
  #' resid.linreg(Petal.Length~Species, data = iris)
  #' resid.linreg(Employed ~ ., longley)
  #' @source \url{http://web.nchu.edu.tw/~numerical/course1012/ra/Applied_Regression_Analysis_A_Research_Tool.pdf}

  l_full_linreg <- linreg(formula, data)
  return (unlist(l_full_linreg$Resid))
}
AdelaidaK/Lab4AdvancedR documentation built on Dec. 17, 2021, 7:40 a.m.