Description Usage Arguments Value References Examples
This function derives or extracts IPD when only total number of events information are available
1 |
ssize |
vector of patients' number at risk at time points from the table |
t.event |
numeric value; total number of events |
group.name |
name of treatment group |
data |
data frame with 2 columns; 1st column has digitised time information and 2nd column has digitised survival rate information |
data frame with time to event, censoring, and group name information
guyot2012enhancedextractKM
1 2 3 4 5 6 7 8 9 10 11 12 | df <- ex.event[,1:2]
df <- df[!is.na(df$x1) & !is.na(df$y1),] # only valid data
res1 <- km.event(ssize=16, t.event=13, group.name="group1", data=df); res1
df <- ex.event[,3:4]
df <- df[!is.na(df$x2) & !is.na(df$y2),]
res2 <- km.event(ssize=39, t.event=28, group.name="group2", data=df); res2
library(survival)
result <- rbind(res1,res2);
km <- survfit(Surv(Surv.Time, Censor) ~ Group, data=result);km
plot(km)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.