knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

MLRnewbie

R-CMD-check

codecov

The goal of MLRnewbie is to provides functionality for conducting multiple linear regression analysis. The packages contains functions that can carry out model construction, residual calculation, and model sum of squares summary.

Functions

There are 3 functios:
linearRegression() Generate linear model.
model_residuals() Calculate linear model's residuals, including studentized residuals.
* ssmodel() Summary SSR, SSE, and SSY for the linear model.

Example

## Import the library
library(MLRnewbie)

## Import data set
mc <- mtcars
## Multiple linear regression with intercept
## We choose "cyl", "disp","hp" in mtcars as X, and "mpg" as Y.
model_car <- linearRegression(data = mc, 
                              predictors = c("cyl", "disp","hp"),
                              response = "mpg")
## Calculating useful residuals. From the left to right, they are Residual, Std_Residual, and Studentized_Residual.
head(model_residuals(model_car))
## All three sum of squares of the linear regression model
ssmodel(model_car)


AmIACommonGuy/MLRnewbie documentation built on Dec. 17, 2021, 8:44 a.m.