plotIPD: Plot graphs comparing the survival estimates from the...

Description Usage Arguments References Examples

Description

This function plots the survival curve from the reconstructed individual patient data (IPD), and compares it with the scanned curve extracted from published image. The output includes three graphs: the graph comparing the two Kaplan-Meier curves from the read-in coordinates, and from the reconstructed IPD; the graph comparing the reported patients number at risk and the estimated patient number at risk; and the graph plotting the discrepancy between the estimated survival rates and the read-in survival rates.

Usage

1
plotIPD(est,ori_dat,maxy=100)

Arguments

est

The list returned from the getIPD function.

ori_dat

The two-column read-in coordinates data used as the input of thepreprocess function. The first column should be the times, and the second column should be the survival rates.

maxy

The scale of survival rates. 100 when the percentages are provided; and 1 when the decimal numbers are provided.

References

Guyot P, Ades AE, Ouwens MJ, Welton NJ. Enhanced secondary analysis of survival data: reconstructing the data from published Kaplan-Meier survival curves. BMC Med Res Methodol.2012; 1:9.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# Radiationdata$radio is a dataset exported from ScanIt software
radio <- Radiationdata$radio
# Load time points when the patients number at risk reported (in month)
trisk <- Radiationdata$trisk

##### Use the trisk and nrisk as input ==========
pre_radio_1 <- preprocess(dat=Radiationdata$radio, trisk=trisk,nrisk=nrisk.radio,maxy=100)
est_radio_1 <- getIPD(prep=pre_radio_1,armind=0,tot.events=NULL)
# Output include reconstructed individual patients data
head(est_radio_1$IPD)
# Plot the estimations
plotIPD (est=est_radio_1,ori_dat=Radiationdata$radio,maxy=100)

##### When trisk and nrisk were not available, then we must input total ========
##### number of initial patients ===============================================
pre_radio_2 <- preprocess(dat=Radiationdata$radio, totalpts=213,maxy=100)
est_radio_2 <- getIPD(prep=pre_radio_2,armind=0,tot.events=NULL)
# Output include reconstructed individual patients data
head(est_radio_2$IPD)
# Plot the estimations
plotIPD (est=est_radio_2,ori_dat=Radiationdata$radio,maxy=100)

NaLiuStat/IPDfromKM documentation built on Oct. 30, 2019, 10:09 p.m.