Description Usage Arguments Value Author(s) Examples
Quick Model Diagnostics in GGplot. Normal QQ Using the Base version diagnostic plots as a template.
1 | Diag.2(My.Model)
|
My.Model |
A model in a list format. eg lm or glm |
A ggplot object; a diagnostic plot (modeled on the base version)
Justin Castagna, justin.castagna@students.mq.edu.au
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ### Normal QQ
# Test models
lm.1 <- lm(mpg ~ wt,data=mtcars)
glm.1 <- glm(formula= vs ~ wt + disp, data=mtcars, family=binomial)
# Example as function()
Diag.2(lm.1)
Diag.2(glm.1)
# Example with magrittr pipe
lm.1 %>% Diag.2()
glm.1 %>% Diag.2()
# Output shoud be a ggplot object in form of diagnostic plot.
# Coresponding Base example
plot(lm.1, which=2)
plot(glm.1, which=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.