FHtestrcp {FHtest}R Documentation

The Fleming-Harrington test for right-censored data based on permutations

Description

The FHtestrcp function performs a test for right-censored data based on a permutation distribution. It uses the G-\rho,\lambda family of statistics for testing the differences of two or more survival curves.

Usage

## Default S3 method:
FHtestrcp(L, R, group, rho = 0, lambda = 0, alternative, method = NULL,
          methodRule = methodRuleIC1, exact = NULL, permcontrol = permControl(), ...)
## S3 method for class 'formula'
FHtestrcp(formula, data, subset, na.action, ...)

Arguments

L

Numeric vector of the left endpoints of the censoring intervals (exact and right-censored data are represented as intervals of [a,a] and (a, infinity) respectively).

R

Numeric vector of the right endpoints of the censoring intervals (exact and right-censored data are represented as intervals of [a,a] and (a, infinity) respectively).

group

A vector denoting the group variable for which the test is desired. If group is a factor or character, then a k-sample test is performed, where k is the number of unique values of group. If group is numeric, then a trend ("correlation" type) test is performed. If there are only two groups, both methods give the same results.

rho

A scalar parameter that controls the type of test (see details).

lambda

A scalar parameter that controls the type of test (see details).

alternative

Character giving the type of alternative hypothesis for two-sample and trend tests: "different", "increasing" or "decreasing" survival functions. For the k-sample case, "different" should be chosen.

method

A character value, one of "pclt", "exact.network", "exact.ce", "exact.mc". If no value is specified, function methodRule chooses the value.

methodRule

A function used to choose the method. Default value is methodRuleIC1 (see details in perm).

exact

A logical value, where TRUE denotes exact test. Ignored if method is not NULL.

permcontrol

List of arguments for controlling permutation tests. Default value is permControl.

formula

A formula with a numeric vector as response (which assumes no censoring) or Surv object. The right side of the formula is the group variable. No strata() is allowed.

data

Data frame for variables in formula.

subset

An optional vector specifying a subset of observations to be used.

na.action

A function that indicates what should happen if the data contain NAs. Default value is set to getOption("na.action").

...

Additional arguments.

Details

The appropriate selection of the parameters rho and lambda gives emphasis to early, middle or late hazard differences. For instance, in a given clinical trial, if one would like to assess whether the effect of a treatment or therapy on the survival is stronger at the earlier phases of the therapy, we should choose lambda = 0, with increasing values of rho emphasizing stronger early differences. If there were a clinical reason to believe that the effect of the therapy would be more pronounced towards the middle or the end of the follow-up period, it would make sense to choose rho = lambda > 0 or rho = 0 respectively, with increasing values of lambda emphasizing stronger middle or late differences. The choice of the weights has to be made prior to the examination of the data and taking into account that they should provide the greatest statistical power, which in turns depends on how it is believed the null is violated.

Many standard statistical tests may be put into the form of the permutation test (see Graubard and Korn, 1987). There is a choice of four different methods to calculate the p-values (the last two are only available for the two-sample test): (1) pclt: using permutational central limit theorem (see, e.g., Sen, 1985). (2) exact.mc: exact method using Monte Carlo. (3) exact.network: exact method using a network algorithm (see, e.g., Agresti, Mehta, and Patel, 1990). Currently, the network method does not implement many of the time saving suggestions such as clubbing. (4) exact.ce: exact method using complete enumeration. This is good for very small sample sizes and when doing simulations, since the complete enumeration matrix need only be calculated once for the simulation.

There are several ways to perform the permutation test, and the function methodRuleIC1 chooses which of these ways will be used. The choice is basically between using a permutational central limit theorem (method = "pclt") or using an exact method. There are several algorithms for the exact method. Note that there are two exact two-sided methods for calculating p-values (see permControl and the tsmethod option).

Value

information

Full description of the test.

data.name

Description of data variables.

n

Number of observations in each group.

diff

The weighted observed minus expected number of events in each group.

scores

Vector with the same length as L and R, containing the rank scores (see Kalbfleisch and Prentice, 2003).

statistic

Either the chi-square or Z statistic.

var

The variance matrix of the test.

alt.phrase

Phrase used to describe the alternative hypothesis.

pvalue

p-value associated with the alternative hypothesis.

p.conf.int

Confidence interval of p-value. For method = "exact.mc" only.

call

The matched call.

Author(s)

R. Oller and K. Langohr

References

Abd-Elfattah, E. F. and Butler, R. W. (2007). The weighted log-rank class of permutation tests: P-values and confidence intervals using saddlepoint methods. Biometrika 94, 543–551.

Fleming, T. R. and Harrington, D. P. (2005). Counting Processes and Survival Analysis New York: Wiley.

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

Kalbfleisch, J. D. and Prentice, R. L. (2002). The Statistical Analysis of Failure Time Data. New York: Wiley, 2nd Edition.

Lawless, J. F. (2003). Statistical Models and Methods for Lifetime Data. New York: Wiley, 2nd Edition.

Oller, R. and Langohr, K. (2017). FHtest: An R Package for the Comparison of Survival Curves with Censored Data. Journal of Statistical Software 81, 1–25.

See Also

FHtestrcc

Examples

## Two-sample tests	
FHtestrcp(Surv(futime, fustat) ~ rx, data = ovarian)
FHtestrcp(Surv(futime, fustat) ~ rx, data = ovarian, method = "exact.network")
FHtestrcp(Surv(futime, fustat) ~ rx, data = ovarian, rho = 1)

## Trend tests
library(KMsurv)
data(bmt)
FHtestrcp(Surv(t2, d3) ~ group, data = bmt, rho = 1, alternative = "decreasing")
FHtestrcp(Surv(t2, d3) ~ group, data = bmt, rho = 1, alternative = "decreasing", 
          exact = TRUE)

## K-sample test
FHtestrcp(Surv(t2, d3) ~ as.character(group), data = bmt, rho = 1, lambda = 1)

[Package FHtest version 1.5.1 Index]