liftPlot: Lift Plot

Description Usage Arguments Author(s) Examples

Description

With provided different model predictions, different lift curves will be plot to compare model improvement.

Usage

1
liftPlot(act,pred1,pred2,weight=NULL,exposure=NULL,breaks=seq(0,2,0.05),showas=NULL)

Arguments

act

A numeric vector to give actual for different.

pred1

A numeric vector to give actual for different.

pred2

A numeric vector to give actual for different.

weight

A numeric vector to give weights for different predictions.

exposure

A numeric vector to give exposure for different predictions.

breaks

A sequence of the numericals defining breaks that differences are split into.

showas

A string vectors to give names for each model on the lift curve.

Author(s)

Sixiang Hu

Examples

1
2
3
4
5
glm1 <- glm(mpg~cyl,data=mtcars,family=Gamma(log))
glm2 <- glm(mpg~cyl+vs,data=mtcars,family=Gamma(log))
pred1 <- predict(glm1,mtcars)
pred2 <- predict(glm2,mtcars)
liftPlot(mtcars$mpg,pred1,pred2,breaks=seq(0.9,1.1,0.01))

SixiangHu/DataMan documentation built on May 9, 2019, 1:48 p.m.