plotEffects | R Documentation |
Plot time-varying effects from a risk regression model.
plotEffects(
x,
formula,
level,
ref.line = TRUE,
conf.int = 0.95,
xlim,
ylim,
xlab = "Time",
ylab = "Cumulative coefficient",
col,
lty,
lwd,
add = FALSE,
legend,
axes = TRUE,
...
)
x |
Fitted object obtained with one of |
formula |
A formula to specify the variable(s) whose regression coefficients should be plotted. |
level |
For categorical variables the level (group) whose contrast to the reference level (group) should be plotted. |
ref.line |
Logical. If |
conf.int |
Logical. If |
xlim |
See |
ylim |
See |
xlab |
See |
ylab |
See |
col |
A vector of colors for the regression coefficients. |
lty |
A vector of line types for the regression coefficients. |
lwd |
A vector of line thicknesses for the regression coefficients. |
add |
Logical. If |
legend |
Logical. If |
axes |
Logical. If |
... |
Used for transclusion of smart arguments for |
Thomas H. Scheike ts@biostat.ku.dk
Thomas A. Gerds tag@biostat.ku.dk
library(survival)
library(prodlim)
data(Melanoma)
fit.tarr <- ARR(Hist(time,status)~strata(sex),
data=Melanoma,
cause=1)
plotEffects(fit.tarr)
fit.tarr <- ARR(Hist(time,status)~strata(sex)+strata(invasion),
data=Melanoma,
cause=1,
times=seq(800,3000,20))
plotEffects(fit.tarr,formula=~sex)
plotEffects(fit.tarr,formula=~invasion)
plotEffects(fit.tarr,
formula=~invasion,
level="invasionlevel.1")
## legend arguments are transcluded:
plotEffects(fit.tarr,
formula=~invasion,
legend.bty="b",
legend.cex=1)
## and other smart arguments too:
plotEffects(fit.tarr,
formula=~invasion,
legend.bty="b",
axis2.las=2,
legend.cex=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.