The Fleming-Harrington test for interval-censored data based on a permutation distribution


The FHtesticp function performs a test for interval-censored data based on a permutation distribution. It uses the G-ρ,λ family of statistics for testing the differences of two or more survival curves.


## Default S3 method:
FHtesticp(L, R, group, rho=0, lambda=0, alternative, permcontrol=permControl(),
          icFIT=NULL, initfit=NULL, icontrol=icfitControl(), exact=NULL,
          method=NULL, methodRule=methodRuleIC1, Lin=NULL, Rin=NULL, ...)
## S3 method for class 'formula'
FHtesticp(formula, data, subset, na.action, ...)



Numeric vector of the left endpoints of the censoring intervals (equivalent to the first element of Surv when type='interval2').


Numeric vector of the right endpoints of the censoring intervals (equivalent to the second element of Surv when type='interval2').


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.


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


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


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.


A precalculated icfit object for increased computation speed. This should be the icfit from the pooled data. Normally initfit should be used instead (see Warning below).


An object of class icfit or icsurv or a character vector giving a function name, used for the initial estimate (see Warning below). Ignored if icFIT is not NULL.


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


List of arguments for controling the NPMLE algorithm in call to icfit. Default value is icfitControl.


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


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


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


Logical vector: should L be included in the interval?


Logical vector: should R be included in the interval?


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 frame for variables in formula.


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


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


Additional arguments.


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.

The censoring in the default case (when Lin=Rin=NULL) assumes there are n (n=length(L)) failure times, and the ith one is in the interval between L[i] and R[i]. The default is not to include L[i] in the interval unless L[i]=R[i], and to include R[i] in the interval unless R[i]=Inf. When Lin and Rin are not NULL they describe whether to include L and R in the associated interval. If either Lin or Rin is length 1 then it is repeated n times, otherwise they should be logicals of length n.

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 method using Monte Carlo. (3) 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).



Full description of the test.

Description of data variables.


Number of observations in each group.


Object of class icfit giving the NPMLE of all responses combined (ignoring the group variable).


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


Vector with the same length as L and R, containing the rank scores (see Oller and G<f3>mez, 2012).


Either the chi-square or Z statistic.


The variance matrix of the test.


Phrase used to describe the alternative hypothesis.


p-value associated with the alternative hypothesis.

Confidence interval of p-value. For method='' only.


The matched call.


Since the input of icFIT is only for saving computational time, no checks are carried out to determine if the icFIT is in fact the correct one. Thus, one may get wrong answers with no warnings if the wrong icFIT object is chosen. A safer way to save computational time is to choose for initfit either a precalculated icfit object or an icsurv object from a function in the Icens package such as EMICM. If this is done, either the correct answer or a warning will be returned even if a bad guess for initfit is chosen. Additionally, one may specify a function name for initfit. The default is NULL which uses a simple initial fit function (the weighted average of the A matrix, see the code of icfit.default (Package interval)). A fast but somewhat unstable function uses initcomputeMLE which uses function computeMLE of the 'MLEcens' package. See the help for icfit for details on the initfit option.


R. Oller and K. Langohr


Fay, M. P. (1996). Rank invariant tests for interval-censored data under the grouped continuous model. Biometrics 52, 811–822.

Fay, M. P. (1999). Comparing several score tests for interval-censored data. Statistics in Medicine 18, 273–285.

G<f3>mez, G., Calle, M. L., Oller, R. and Langohr, K. (2009). Tutorial on methods for interval-censored data and their implementation in R. Statistical Modelling 9, 259–297.

Oller, R. and G<f3>mez, G. (2012). A generalized Fleming and Harrington's class of tests for interval-censored data. The Canadian Journal of Statistics 40, 501–516.

See Also

FHtestics, icfit (Package interval), icsurv (Package Icens).


## Two-sample tests
FHtesticp(Surv(left, right, type="interval2")~treatment, data=bcos)
FHtesticp(Surv(left, right, type="interval2")~treatment, data=bcos, exact=TRUE)
FHtesticp(Surv(left, right, type="interval2")~treatment, data=bcos, rho=1)

FHtesticp(Surv(left, right, type="interval2")~as.factor(age>21), data=duser, rho=1,
          Lin=TRUE, Rin=TRUE, subset=(zper==3), icontrol=icfitControl(maxit=100000))

## Trend test
FHtesticp(Surv(left, right, type="interval2")~group, data=illust3, alternative="increasing",
          subset=c(1:100, 601:700, 1201:1300), lambda=1, Lin=TRUE, Rin=TRUE)

## K-sample test
FHtesticp(Surv(left, right, type="interval2")~as.character(zper), data=duser, rho=3, lambda=3,
          Lin=TRUE, Rin=TRUE, subset=(zper>1)&(zgen==0))

Want to suggest features or report bugs for Use the GitHub issue tracker. Vote for new features on Trello.

comments powered by Disqus