Diag.2: Normal QQ - Diagnostic ggplots for models

Description Usage Arguments Value Author(s) Examples

Description

Quick Model Diagnostics in GGplot. Normal QQ Using the Base version diagnostic plots as a template.

Usage

1
Diag.2(My.Model)

Arguments

My.Model

A model in a list format. eg lm or glm

Value

A ggplot object; a diagnostic plot (modeled on the base version)

Author(s)

Justin Castagna, justin.castagna@students.mq.edu.au

Examples

 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)

jcastagna/ggDiagnostic documentation built on May 30, 2019, 4:34 p.m.