Description Usage Arguments Value Examples
This function draws the confident interval area of one group of a survfit object. For Competitive risk analysis, the event number needs to be specified.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
x |
A survfit or a Cuminc object. |
group |
Number of the chosen group. If the model-object has only one Strata (Group), this parameter can be omitted. |
event |
If the model-object is a multistate-model, the event-type needs to be specified. |
conf.int |
The confidence-interval is plotted as lines if TRUE. Default is FALSE |
mark.time |
The times of censoring are marked if TRUE. Default is FALSE |
col |
Color of the line. Default is "black". |
lty |
Line-type of the line. Default is 1. |
lwd |
Line-wide of the line. Default is 1. |
cex.markTime |
Size of the marks for censoring. Default is 1. |
pch.markTime |
Character of the marks for censoring. Default is 1 (stroke). |
col.confInt |
Color of the line for the confidence interval. Default is "black". |
lty.confInt |
Line-type of the line for the confidence interval. Default is 2. |
lwd.confInt |
Line-wide of the line for the confidence interval. Default is 1. |
invert |
Inverts the curve if TRUE. Default is FALSE. |
Draws the survival curve for one group / one event.
1 2 3 4 5 6 7 8 9 10 | require(survival)
aml_model <- with(aml, survfit(Surv(time, status)~x))
col1 <- adjustcolor("red",0.2); col2 <- adjustcolor("blue",0.2)
survPlot(xmax=50, space.nrAtRisk=0.32)
confIntArea(aml_model, col=col1, group=1)
confIntArea(aml_model, col=col2, group=2)
survCurve(aml_model, group=1)
survCurve(aml_model, group=2, lty=2)
nrAtRisk(aml_model, group=1, y=-0.17, bgcol.flag=col1, label="maintain")
nrAtRisk(aml_model, group=2, y=-0.24, bgcol.flag=col2, lty.flag=2, label="non-maint.")
|
Loading required package: survival
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.