Learn R Programming

auditor (version 0.3.0)

plotTwoSidedECDF: Two-sided Cumulative Distribution Function

Description

Cumulative Distribution Function for positive and negative residuals.

Usage

plotTwoSidedECDF(object, ..., error.scaled = TRUE, outliers = NA,
  residuals = TRUE, y.reversed = FALSE)

Arguments

object

An object of class ModelAudit.

...

Other modelAudit objects to be plotted together.

error.scaled

A logical value indicating whether ECDF should be scaled by proportions of positive and negative proportions.

outliers

Number of outliers to be marked.

residuals

A logical value indicating whether residuals should be marked.

y.reversed

A logical value indicating whether values on y axis should be reversed.

Value

ggplot object

See Also

plot.modelAudit

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)
plotTwoSidedECDF(lm_au)

library(randomForest)
rf_model <- randomForest(prestige~education + women + income, data = Prestige)
rf_au <- audit(rf_model, data = Prestige, y = Prestige$prestige)
plotTwoSidedECDF(lm_au, rf_au, y.reversed = TRUE)

# }

Run the code above in your browser using DataLab