Description Usage Arguments Details Value See Also Examples
Plots an event based data frame
1 2 |
dfSim |
a data.frame with time status and recruitmenttime = tn. |
col |
a vector of two colours. The first one defines the color of observations without an event and the second one the color of the observations with an event. Default is c("grey","black"). |
... |
additional |
The graph shows the observation time per patient from recruitment until administrative censoring.
Patients with an event are colored differently.
The Observations are sorted by observation time, status and group.
Generates a new plot.
1 2 3 4 5 6 7 8 | N <- matrix(rep(50,10),ncol=2)
dfSim <- simSurvData(N=N, lambda=-log(1-.3)/24, sigma=1, theta=.7, gamma=-log(1-.2)/24, kappa=1, distS = "exponential",distC = "exponential",L=10)
plot(dfSim)
# to see the corresponding Kaplan-Meyer curve
require(survival)
fit <- survfit(Surv(time=time-tn, event = status) ~group,data = dfSim)
plot(fit)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.