getIPD: Reconstruct individual patient data (IPD) from scanned...

Description Usage Arguments Details Value References Examples

View source: R/getIPD.R

Description

This function uses the preprocess class as input to map the digitalized curve to the individual patient data. In addition, the total number of events is an optional input; and the treatment arm can be arbitrarily assigned to label the patients' group (for example, 0 for control group, and 1 for treatment group).

The output will be the reconstructed IPD in the form of three columns table (time, patient status, and treatment group indicator).

Usage

1
getIPD(prep,armind=1,tot.events=NULL)

Arguments

prep

The class object from the preprocess function.

armind

The arbitrary lable used as the group indicator for the reconstructed IPD. Typically 0 for the control group and 1 for the treatment group.

tot.events

The total events number. Only available for some published curves, and the default value is NULL.

Details

The extracted coordinates from scanned KM curve include time points, and the corresponding survival rates. To evaluate the accuracy of our reconstructed process, the survival rates at each read-in time points will be re-calculated from the estimated IPD, then compared with the original read-in survival rates from the coordinates. The root mean square error(RMSE) and p values (calculated via a bootstrap two-sampe t test, and Mann-Whitney test) will be reported as measurments of the discrepancy between estimated and scanned KM curves.

The output includes the reconstructed IPD in the form of lifetable. Using theplotIPD function, users can further graph the survival curve from the reconstructed IPD, and compare it with the read-in dataset from the scanned curve. Simple survival analysis can also be performed on the reconstructed IPD using the survreport function.

Value

An object of class getIPD containing eight components as follow.
IPD: the estimated individual patient data with three columns (time,status,and treatment group indicator).
points: the dataframe with estimations at each read-in time point.
riskmat: the dataframe of the lower and upper index, and the data estimates for censored patients and events within each time interval.
endpts: the number of patients remaining at the end of trial.
mwtest: the Mann-Whitney test result for comparing distribution of original and estimated curves.
rootp: the p value of the bootstrap t test for the mean discrepancy of original and estimated curves.
var_surv: the variance of survival rates introduced by the reconstruction procedure. dt: the dataframe summarized the results.

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
22
23
24
# 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

# Load patients number at risk reported at the time points in trisk =============
nrisk.radio <- Radiationdata$nrisk.radio

# Use the trisk and nrisk as input for preprocess and reconstruction ============
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)

# 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)

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