Produces a Follow-Up (or inverse Kaplan Meier Plot) comparing actual and ideal observation times. Patients with event are censored. Medians are indicated.

FollowUpPlot(DFR, TIMES, STATUS, IDEALTIMES,
  MAIN = "Distribution of ideal and actual observation times",
  XLAB = "follow-up time", YLAB = "proportion still under observation",
  UNITS = "months", COLS = c(3, 2), 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

MAIN

="Distribution of ideal and actual observation times", plot title

XLAB

="follow-up time", label for time axis

YLAB

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

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 ideal and actual observation curves

CEX

=1.2, scaling factor of fonts on axes and legend

Value

returns data.frame with estimates and 95

Details

FollowUpPlot

Examples

if (FALSE) { ### Test FollowUpPlot TIMES<-rexp(100)*12 TIMES[1:5]<--TIMES[1:5] STATUS<-rbinom(100,1,.2) IDEALTIMES<-runif(100,min=1,max=70) DFR<-data.frame(TIMES,STATUS,IDEALTIMES) FollowUpPlot(DFR=DFR,"TIMES","STATUS","IDEALTIMES",UNITS="months") FollowUpPlot(DFR=DFR,"TIMES","STATUS","IDEALTIMES",UNITS="years") FollowUpPlot(DFR=NULL,TIMES,STATUS,IDEALTIMES,UNITS="months",COLS=c(4,3)) FollowUpPlot(DFR=NULL,TIMES,STATUS,IDEALTIMES,UNITS="days",CEX=1.5) }