Practical exercise 2

 

In this exercise we will look at the various options for the survfit command in R.

 
The survfit command may compute three different estimates for the survival function.
These are specified by the type-option. 
The possibilities are type="kaplan-meier" (default) 
type="fleming-harrington", and 
type="fh2" (only the first two characters are necessary). 
 
Here "kaplan-meier" computes the Kaplan-Meier estimator given by (3.26) and (3.32) in ABG, 
while the two other options computes the survival estimate as exp{-Nelson-Aalen}. 
The difference between the two is the treatment of ties for the Nelson-Aalen estimator. 
Type "fleming-harrington" computes the Nelson-Aalen estimator using (3.13) in ABG, while type "fh2" uses (3.12)
 

For comparison of the different survival estimates, we will use the leukemia data from Exercise 3.1.

You may read the data into R by the command:

leukemia=read.table("http://www.math.uio.no/~borgan/abg-2008/data/leukemia.txt", header=T)
 
a) Compute the three estimates for the survival function and compare the results. 
Which estimates is the smallest and which is the largest? 
 
The survfit command may also compute two different estimates of the standard error. 
These are specified by the error-command. 
The possibilites are error="greenwood" and error="tsiatis" (only the first character is necessary).

 

Here "greenwood" computes Greenwood's formula given by (3.28) and (3.33) in ABG, 
while "tsiatis" computes (3.27)
 
a) Compute the two standard error estimates and compare the results.