cendiff {NADA}R Documentation

Test Censored ECDF Differences

Description

Tests if there is a difference between two or more empirical cumulative distribution functions (ECDF) using the G-rho family of tests, or for a single curve against a known alternative.

This function shares the same arguments as survdiff. See survdiff for more info.

Usage

cendiff(formula, rho=1, ...)

Arguments

formula a formula expression as for other ECDF models, of the form Cen(obs, censored) ~ predictors. For a one-sample test, the predictors must consist of a single offset(sp) term, where sp is a vector giving the survival probability of each subject. For a k-sample test, each unique combination of predictors defines a subgroup. A strata term may be used to produce a stratified test. To cause missing values in the predictors to be treated as a separate group, rather than being omitted, use the strata function with its na.group=T argument.
rho a scalar parameter that controls the type of test. See Method below.
... additional items to pass to survdiff. Note

Value

a list with components:

n the number of subjects in each group.
obs the weighted observed number of events in each group. If there are strata, this will be a matrix with one column per stratum.
exp the weighted expected number of events in each group. If there are strata, this will be a matrix with one column per stratum.
chisq the chisquare statistic for a test of equality.
var the variance matrix of the test.
strata optionally, the number of subjects contained in each stratum.

Method

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. With rho = 0 this is the log-rank or Mantel-Haenszel test, and with rho = 1 it is equivalent to the Peto & Peto modification of the Gehan-Wilcoxon test. The default is rho = 1, or the Peto & Peto test.

If the right hand side of the formula consists only of an offset term, then a one sample test is done. To cause missing values in the predictors to be treated as a separate group, rather than being omitted, use the factor function with its exclude argument.

Author(s)

Lopaka(Rob) Lee <rclee@usgs.gov>

References

Helsel, Dennis R. (2005). Nondectects and Data Analysis; Statistics for censored environmental data. John Wiley and Sons, USA, NJ.

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

Examples

    # Contrived: are there diffs between instrument methods?
    obs        = c(0.5,    0.5,   1.0,  1.5,   5.0,    10,   100)
    censored   = c(TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE)
    instrument = as.factor(c('ICP', 'ICP', 'ICP', 'AA',  'AA',  'AA',  'AA'))

    cendiff(Cen(obs, censored)~instrument)

[Package NADA version 1.1-2 Index]