fun1: MLR Assumptions Function

Description Usage Arguments Value Examples

View source: R/fun1.R

Description

MLR Assumptions Function

Usage

1
fun1(lm, k)

Arguments

lm

a linear model

k

the number of independent variables in the model

Value

Shapiro-Wilk Normality Test

Breusch-Pagan Test

Durbin-Watson Test

Variance Inflation Factor

plots of the residuals against each independent variable

a plot of the fitted values vs. residuals

a QQ plot

Examples

1
2
3
4
5
y <- rnorm(100, 1, 0)
x1 <- rnorm(100, 2, 1)
x2 <- rnorm(100, 3, 2)
ylm <- lm(y ~ x1 + x2)
fun1(ylm, 2)

leahpom/F2020Projt3LP documentation built on Jan. 1, 2021, 8:17 a.m.