diagnosticPlots: Regression diagnostic plots and tests

Description Usage Arguments Details Value Author(s)

Description

Generate regression diagnostic plots and tests for linear regression models.

Usage

1
diagnosticPlots(data, y, x, covar)

Arguments

data

The dataset with the variables of interest

y

The dependent or outcome variable (that is, the y in the regression equation)

x

The independent, exposure, or predictor variable (that is, the x in the regression equation)

covar

The variables selected as to condition or adjust for the y and x relationship, also known as the confounding variables

Details

This function runs a linear regression on the specified variables and generates diagnostics based on the regression. Basic diagnostics include checking the normality of the residuals, assessing outliers, influence and Cook's D, and multicollinearity. Several tests have been commented out, though they can be uncommented if desired (edit the function to output these if desired). Some of the tests I don't fully understand how to interpret them, but as I learn more I will probably know. This function relies on MASS and gplots.

Value

Outputs multiple plots and textplots with diagnostic information

Author(s)

Luke Johnston


lwjohnst86/rstatsToolkit documentation built on May 21, 2019, 9:15 a.m.