Package 'FHtest'

Title: Tests for Right and Interval-Censored Survival Data Based on the Fleming-Harrington Class
Description: Functions to compare two or more survival curves with: a) The Fleming-Harrington test for right-censored data based on permutations and on counting processes. b) An extension of the Fleming-Harrington test for interval-censored data based on a permutation distribution and on a score vector distribution.
Authors: Ramon Oller, Klaus Langohr
Maintainer: Ramon Oller <[email protected]>
License: GPL (>= 2)
Version: 1.5.1
Built: 2025-02-27 03:30:37 UTC
Source: https://github.com/cran/FHtest

Help Index


Tests for Right and Interval-Censored Survival Data Based on the Fleming-Harrington Class

Description

This package offers several tests for the comparison of two or more survival curves:

a) The Fleming-Harrington test for right-censored data based on permutations and on counting processes.

b) An extension of the Fleming-Harrington test for interval-censored data based on a permutation distribution and on a score vector distribution.

Details

Package: FHtest
Type: Package
Version: 1.51
Date: 2023-11-30
License: GPL (>= 2)

Author(s)

Ramon Oller and Klaus Langohr

Ramon Oller <[email protected]>

References

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

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.


Data set of drug users in Badalona (Spain)

Description

Data set of 940 drug users in Badalona (Spain). The data come from the detoxification unit of Hospital Universitari Germans Trias i Pujol in Badalona, Spain

Usage

data(duser)

Format

A data frame with 940 observations on the following 5 variables.

left

Left endpoint of time to HIV-infection

right

Right endpoint of time to HIV-infection

zper

Calendar period

zgen

Gender (0: male; 1: female)

age

Age

Source

Detoxification unit, Hospital Universitari Germans Trias i Pujol, Badalona, Spain.

References

Gómez, G., Calle, M. L., Egea, J. M. and Muga, R. (2000). Risk of HIV infection as a function of the duration of intravenous drug use: A non-parametric Bayesian approach. Statistics in Medicine 19, 2641–2656.

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


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

Description

The FHtesticp function performs a test for interval-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:
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, ...)

Arguments

L

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

R

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

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.

icFIT

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).

initfit

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.

permcontrol

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

icontrol

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

exact

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

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).

Lin

Logical vector: should L be included in the interval?

Rin

Logical vector: should R be included in the interval?

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.

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.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.

fit

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

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 Oller and Gómez, 2012).

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.

Warning

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.

Author(s)

R. Oller and K. Langohr

References

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ó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ómez, G. (2012). A generalized Fleming and Harrington's class of tests for interval-censored data. The Canadian Journal of Statistics 40, 501–516.

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

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

Examples

## Two-sample tests
data(bcos)
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)

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

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

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

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

Description

The FHtestics function performs a test for interval-censored data based on a score vector distribution. It uses the G-ρ\rho family of statistics (being λ=0\lambda = 0) for testing the differences of two or more survival curves.

Usage

## Default S3 method:
FHtestics(L, R, group, rho = 0, lambda = 0, alternative, tol = 10^-8, icFIT = NULL,
          initfit = NULL, icontrol = icfitControl(), Lin = NULL, Rin = NULL, ...)
## S3 method for class 'formula'
FHtestics(formula, data, subset, na.action, ...)

Arguments

L

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

R

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

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. With this method, lambda has to be zero.

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.

tol

Tolerance for the calculation of the g-inverse. Values less than tol are set to zero.

icFIT

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).

initfit

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.

icontrol

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

Lin

Logical vector: should L be included in the interval?

Rin

Logical vector: should R be included in the interval?

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 parameter rho gives emphasis to early 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 rho>0 emphasizing stronger early differences.

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.

It is difficult to prove the asymptotic validity of the standard score tests for this likelihood, because the number of nuisance parameters typically grows with the sample size and often many of the parameters are equal at the nonparametric MLE, i.e., they are on the boundary of the parameter space (Fay, 1996). Specifically, when the score test is performed, an adjustment is made so that the nuisance parameters are defined based on the data and do not approach the boundary of the parameter space (see Fay, 1996). Theoretically, the score test should perform well when there are many individuals but few observation times, and its advantage in this situation is that it retains validity even when the censoring mechanism may depend on the treatment.

Value

information

Full description of the test.

data.name

Description of data variables.

n

Number of observations in each group.

fit

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

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 Oller and Gómez, 2012).

statistic

Either the chi-square or Z statistic.

var

The variance matrix of the test.

d2L.dB2

Second derivative of the log-likelihood with respect to β\beta.

d2L.dgam2

Second derivative of the log-likelihood with respect to γ\gamma.

d2L.dBdgam

Derivative of the log-likelihood with respect to β\beta and γ\gamma.

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.

Warning

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.

Author(s)

R. Oller and K. Langohr

References

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ó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ómez, G. (2012). A generalized Fleming and Harrington's class of tests for interval-censored data. The Canadian Journal of Statistics 40, 501–516.

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

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

Examples

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

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

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

## K-sample test
FHtestics(Surv(left, right, type = "interval2") ~ as.factor(group), data = illust3,
          subset = c(1:100, 601:700, 1201:1300), rho = 3, Lin = TRUE, Rin = TRUE)

The Fleming-Harrington test for right-censored data based on counting processes

Description

The FHtestrcc function performs a test for right-censored data based on counting processes. It uses the G-ρ,λ\rho,\lambda family of statistics for testing the differences of two or more survival curves.

Usage

## Default S3 method:
FHtestrcc(L, R, group, rho = 0, lambda = 0, alternative, ...)
## S3 method for class 'formula'
FHtestrcc(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.

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.

Value

information

Full description of the test.

data.name

Description of data variables.

n

Number of observations in each group.

obs

The weighted observed number of events in each group.

exp

The weighted expected number of events in each group.

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.

call

The matched call.

Author(s)

R. Oller and K. Langohr

References

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

FHtestrcp

Examples

## Two-sample tests
FHtestrcc(Surv(futime, fustat) ~ rx, data = ovarian)
FHtestrcc(Surv(futime, fustat) ~ rx, data = ovarian, rho = 1)

## Trend test
library(KMsurv)
data(bmt)
FHtestrcc(Surv(t2, d3) ~ group, data = bmt, rho = 1, alternative = "decreasing")

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

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)

Data set of an AIDS clinical trial

Description

Data set from an AIDS clinical trial designed to study the benefits of Zidovudine therapy in patients in the early stage of HIV infection. It contains interval-censored data of 1607 individuals.

Usage

data(illust3)

Format

A data frame with 1607 observations on the following 3 variables.

left

Left endpoint of censoring interval.

right

Right endpoint of censoring interval.

group

Treatment group (1 = deferred therapy; 2 = 500 mg/day dosage; 3 = 1500 mg/day dosage).

References

Calle, M. L. and Gómez, G. (2001). Nonparametric Bayesian estimation from interval-censored data using Monte Carlo methods. Journal of Statistical Planning and Inference 98, 73–87.

Gómez, G., Calle, M. L. and Oller, R. (2004). Frequentist and Bayesian approaches for interval-censored data and their implementation in R. Statistical Papers 45, 139–173.

Volberding, P. A., Lagakos, S. W., Grimes, J. M., Stein, D. S., et al. (1995). A Comparison of Immediate with Deferred Zidovudine Therapy for Asymptomatic HIV-Infected Adults with CD4 Cell Counts of 500 or More per Cubic Millimeter. The New England Journal of Medicine 333, 401–407.