Description Usage Arguments Details Value Author(s)
Generate regression diagnostic plots and tests for linear regression models.
1 | diagnosticPlots(data, y, x, covar)
|
data |
The dataset with the variables of interest |
y |
The dependent or outcome variable (that is, the |
x |
The independent, exposure, or predictor variable (that
is, the |
covar |
The variables selected as to condition or adjust for
the |
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.
Outputs multiple plots and textplots with diagnostic information
Luke Johnston
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.