pairs.logitModel: S3 Pairs Method for logitModel Objects

Description Usage Arguments Examples

Description

This internal function defines a pairs method for an object of logitModel class. The main idea is to plot all explanatory variables agaist the response variable of the model in order to quickly assess the influence of each one.

Usage

1
2
## S3 method for class 'logitModel'
pairs(model, nRow, single = FALSE, col, ask, ...)

Arguments

model

an object of class logitModel.

nRow

optional numeric vector indicating the number of rows the overall plot should have.

single

boolean to indicate whether each variable should be plotted against the response variable individually.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(42)
n <- 100
dummies <- sample(LETTERS[1:5], n, replace = TRUE)
X1 <- rnorm(n); X2 <- rnorm(n)
points <- 2 * X1 - 3 * X2
y <- rbinom(n, 1, exp(points) / (1 + exp(points)))
df <- as.data.frame(cbind(b2 = X1, b3 = X2))
myFitD <- logitModel(y ~ X1 + X2 + dummies)
pairs(myFitD)
pairs(myFitD, single = TRUE)

mr-avila/logitModel documentation built on May 13, 2019, 5:25 p.m.