modelPlot | R Documentation |
Draw coefficients/odds ratio/hazard ratio plot
modelPlot(
fit,
widths = NULL,
change.pointsize = TRUE,
show.OR = TRUE,
show.ref = TRUE,
bw = TRUE,
legend.position = "top",
...
)
fit |
An object of class glm |
widths |
Numeric vector |
change.pointsize |
logical Whether or not change point size |
show.OR |
logical Whether or not show odds ratio |
show.ref |
logical Whether or not show reference |
bw |
logical If true, use grey scale |
legend.position |
legend position default value is 'top' |
... |
Further arguments to be passed to autoReg() |
modelPlot returns an object of class "modelPlot" An object of class modelPlot is a list containing at least of the following components:
The first table containing names
The 2nd table containing levels
The 3rd table containing coefficients or odds ratio or hazards ratio
A ggplot
the widths of the tables and the ggplot
fit=lm(mpg~wt*hp+am,data=mtcars)
modelPlot(fit,widths=c(1,0,2,3))
modelPlot(fit,uni=TRUE,threshold=1,widths=c(1,0,2,3))
fit=lm(Sepal.Width~Sepal.Length*Species,data=iris)
modelPlot(fit)
modelPlot(fit,uni=TRUE,change.pointsize=FALSE)
data(cancer,package="survival")
fit=glm(status~rx+age+sex+nodes+obstruct+perfor,data=colon,family="binomial")
modelPlot(fit)
modelPlot(fit,uni=TRUE,multi=TRUE,threshold=1)
modelPlot(fit,multi=TRUE,imputed=TRUE,change.pointsize=FALSE)
data(colon_s,package="finalfit")
fit=glm(mort_5yr~age.factor+sex.factor+obstruct.factor+perfor.factor,data=colon_s,family="binomial")
modelPlot(fit)
modelPlot(fit,uni=TRUE,multi=TRUE,threshold=1)
modelPlot(fit,uni=TRUE,multi=TRUE)
modelPlot(fit,uni=TRUE,multi=TRUE,threshold=1,show.ref=FALSE)
library(survival)
fit=coxph(Surv(time,status)~rx+age+sex+obstruct+perfor,data=colon)
modelPlot(fit)
modelPlot(fit,uni=TRUE,threshold=1)
modelPlot(fit,multi=FALSE,final=TRUE,threshold=1)
fit=coxph(Surv(time,status)~age.factor+sex.factor+obstruct.factor+perfor.factor,data=colon_s)
modelPlot(fit)
modelPlot(fit,uni=TRUE,threshold=1)
modelPlot(fit,uni=TRUE,threshold=1,show.ref=FALSE)
modelPlot(fit,imputed=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.