Learn R Programming

auditor (version 0.2.1)

plot.modelAudit: Model diagnostic plots

Description

This function provides several diagnostic plots for regression and classification models.

Usage

# S3 method for modelAudit
plot(x, ..., type = "Residual", ask = TRUE)

Arguments

x

object of class modelAudit

...

other arguments dependent on the type of plot or additionl objects of class modelAudit

type

the type of plot. Possible values: 'ACF', 'Autocorrelation', 'CumulativeGain', 'CooksDistance', 'HalfNormal', 'Residuals', 'LIFT', ModelPCA', 'ModelRanking', ModelCorrelation', 'Prediction', 'REC', 'ResidualDensity', 'Residual', 'ROC', 'RROC', ScaleLocation', 'TwoSidedECDF' (for detailed description see functions in see also section).

ask

logical; if TRUE, the user is asked before each plot, see par(ask=).

See Also

plotACF, plotAutocorrelation, plotCumulativeGain, plotCooksDistance, plotHalfNormal, plotResidual, plotLIFT, plotModelPCA, plotModelRanking, plotModelCorrelation, plotPrediction, plotREC, plotResidualDensity, plotResidual, plotROC, plotRROC, plotScaleLocation, plotTwoSidedECDF

Examples

Run this code
# NOT RUN {
library(car)
lm_model <- lm(prestige~education + women + income, data = Prestige)
lm_au <- audit(lm_model, data = Prestige, y = Prestige$prestige)
plot(lm_au)

library(randomForest)
rf_model <- randomForest(prestige~education + women + income, data = Prestige)
rf_au <- audit(rf_model, data = Prestige, y = Prestige$prestige)
plot(lm_au, rf_au, type = "ModelRanking")


# }

Run the code above in your browser using DataLab