ggPredict: Visualize predictions from the multiple regression models.

Description Usage Arguments Examples

View source: R/ggPredict.R

Description

Visualize predictions from the multiple regression models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
ggPredict(
  fit,
  colorn = 4,
  point = NULL,
  jitter = NULL,
  se = FALSE,
  show.summary = FALSE,
  colorAsFactor = FALSE,
  digits = 2,
  interactive = FALSE,
  ...
)

Arguments

fit

a model object for which prediction is desired.

colorn

Integer. Number of subgroups of color variables.

point

Logical. Whether or not draw each point

jitter

Logical. Whether or not jitter points

se

Logical. Whether or not draw se

show.summary

Logical. Whether or not show summary

colorAsFactor

Logical. Whether or not treat color variable as categorical variable

digits

An integer indicating the number of decimal places

interactive

A logical value. If TRUE, an interactive plot will be returned

...

additional arguments affecting the predictions produced.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(moonBook)
require(ggplot2)
require(ggiraph)
require(plyr)
fit=lm(NTAV~age*weight,data=radial)
fit=lm(NTAV~age*weight*DM,data=radial)
fit=lm(NTAV~age+DM,data=radial)
ggPredict(fit,interactive=TRUE)
require(TH.data)
fit=glm(cens~pnodes*horTh,data=GBSG2,family=binomial)
ggPredict(fit,se=TRUE)
fit1=glm(cens~pnodes*age,data=GBSG2,family=binomial)
ggPredict(fit1)
ggPredict(fit1,colorn=100,jitter=FALSE,interactive=TRUE)
fit2=glm(cens~pnodes*age*horTh,data=GBSG2,family=binomial)
ggPredict(fit2,colorn=100,jitter=FALSE,interactive=TRUE)

cardiomoon/ggiraphExtra documentation built on Oct. 9, 2020, 4:16 a.m.