powered by
Creates diagnostic plots for model residuals including residuals vs fitted, scale-location, and histogram of residuals.
plot_residuals(object, type = c("all", "fitted", "histogram", "qq"), ...)
A ggplot2 object or list of ggplot2 objects.
A fitted model object.
Character; type of residual plot. One of:
"fitted": Residuals vs fitted values
"fitted"
"histogram": Histogram of residuals
"histogram"
"qq": Q-Q plot of residuals
"qq"
"all": All plots combined (default)
"all"
Additional arguments passed to plotting functions.
# \donttest{ data(apt) fit <- fit_demand_hurdle(apt, y_var = "y", x_var = "x", id_var = "id") plot_residuals(fit) # }
Run the code above in your browser using DataLab