Test Survival Curve Differences

DESCRIPTION:
Tests if there is a difference between two or more survival curves using the G-rho family of tests. This function is deprecated, use survdiff instead.

USAGE:
surv.diff(time, status, group, rho=0)

REQUIRED ARGUMENTS:
time:
vector of times, all values must be greater than or equal to zero.
Missing values (NA) are allowed.
status:
vector of status values. Typically, the values are 0 or 1, in which case 0 means censored and 1 means uncensored (dead). The values can also be 1 and 2, in which case 1 is subtracted from all of the values. If the only value in status is 1, then this is interpreted as meaning that all values are uncensored.
Missing values (NA) are allowed. This must have the same length as time.
group:
numeric vector or category that identifies the survival curve to which each observation belongs. Missing values (NA) are allowed. This must have the same length as time.

OPTIONAL ARGUMENTS:
rho:
a parameter that controls the type of test. (See DETAILS below.)

VALUE:
a list of class "surv.diff" with components:
n:
the number of subjects in each group.
obs:
the weighted observed number of events in each group.
exp:
the weighted expected number of events in each group.
chisq:
the chisquare statistic for a test of equality.

DETAILS:
Observations for which there is a missing value in time, status or group are dropped from the calculations.

This function implements the G-rho family of Harrington and Fleming (1982), with weights on each death of (S(t))^rho, where S is the Kaplan-Meier estimate of survival. When rho = 0 this is the log-rank or Mantel-Haenszel test, and when rho = 1 it is very close to the Peto & Peto modification of the Gehan-Wilcoxon test.


REFERENCE:
Harrington, D. P. and Fleming, T. R. (1982). A class of rank test procedures for censored survival data. Biometrika 69, 553-566.

SEE ALSO:
print.surv.diff , surv.fit , coxreg .

EXAMPLES:
xx <- surv.diff(cancer$time, cancer$status, rx)
print(xx)                                   #nice printout of results