Produces a DataMaturity Plot comparing an actual Kaplan Meier curve with the optimistic one assuming all events known.

DataMaturityPlot(DFR, TIMES, STATUS, IDEALTIMES, TIMEPOINT = NULL,
  MAIN = "Data Maturity Plot: fudged versus actual", XLAB = "time",
  YLAB = "proportion still under observation", YLIM = c(0, 1),
  UNITS = "months", COLS = c(3, 2), ABLINES = NULL, CEX = 1.2)

Arguments

DFR

data.frame with variables TIMES, STATUS, IDEALTIMES (colnames). Alternatively, if DFR set to NULL, TIMES, STATUS, IDEALTIMES will be treated as data vectors.

TIMES

name of times component of time to event, alternatively data vector

STATUS

name of status component of time to event, alternatively data vector

IDEALTIMES

name of ideal observation time component of time to event, alternatively data vector

TIMEPOINT

=NULL, time where to read off curves, set at about 80 percent percentile if not specified

MAIN

="Data Maturity Plot - fudged versus actual", plot title

XLAB

="time", label for time axis

YLAB

="proportion still under observation", label for y axis

YLIM

=c(0,1), you may shorten y-axis if desired

UNITS

="months", unit of time appendend at XLAB if not NULL or blank. In addition, 'months', 'Months', 'days', 'Days' are recognised and used to find appropriate ticks.

COLS

=c(3,2), colours for curves based on ideal and actual observations

ABLINES

=NULL, horizontal dashed lines

CEX

=1.2, scaling factor of fonts on axes and legend

Value

returns data.frame with estimates and 95percent-CI of survival times at TIMEPOINT (Fudged and Actual)

Details

DataMaturityPlot

Examples

if (FALSE) { TIMES<-rexp(100)*60 CENS<-runif(100,0,80) STATUS<-(TIMES <= CENS) TIMES[TIMES > CENS]<-CENS[TIMES > CENS] IDEALTIMES<-TIMES+12 IDEALTIMES[STATUS]<-TIMES[STATUS] DFR<-data.frame(TIMES,STATUS,IDEALTIMES) DataMaturityPlot(DFR=DFR,"TIMES","STATUS","IDEALTIMES",UNITS="months") DataMaturityPlot(DFR=DFR,"TIMES","STATUS","IDEALTIMES",UNITS="years") DataMaturityPlot(DFR=NULL,TIMES,STATUS,IDEALTIMES,UNITS="months",COLS=c(4,3)) DataMaturityPlot(DFR=NULL,TIMES,STATUS,IDEALTIMES,UNITS="days",CEX=1.0) }