Description Usage Arguments Details Value Author(s) References See Also Examples
The FHtestrcc
function performs a test for rightcensored data based on counting processes. It uses the Gρ,λ family of statistics for testing the differences of two or more survival curves.
1 2 3 4 
L 
Numeric vector of the left endpoints of the censoring intervals (exact and rightcensored 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 rightcensored 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 
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 twosample and trend tests: 
formula 
A formula with a numeric vector as response (which assumes no censoring) or 
data 
Data frame for variables in 
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 
... 
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 followup 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.
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 chisquare or Z statistic. 
var 
The variance matrix of the test. 
alt.phrase 
Phrase used to describe the alternative hypothesis. 
pvalue 
pvalue associated with the alternative hypothesis. 
call 
The matched call. 
R. Oller and K. Langohr
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.
FHtestrcp
1 2 3 4 5 6 7 8 9 10 11  ## Twosample 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")
## Ksample test
FHtestrcc(Surv(t2, d3)~as.character(group), data = bmt, rho = 1, lambda = 1)

Loading required package: interval
Loading required package: survival
Loading required package: perm
Loading required package: Icens
Loading required package: MLEcens
Loading required package: KMsurv
Twosample test for rightcensored data
Parameters: rho=0, lambda=0
Distribution: counting process approach
Data: Surv(futime, fustat) by rx
N Observed Expected OE (OE)^2/E (OE)^2/V
rx=1 13 7 5.23 1.77 0.596 1.06
rx=2 13 5 6.77 1.77 0.461 1.06
Statistic Z= 1, pvalue= 0.303
Alternative hypothesis: survival functions not equal
Twosample test for rightcensored data
Parameters: rho=1, lambda=0
Distribution: counting process approach
Data: Surv(futime, fustat) by rx
N Observed Expected OE (OE)^2/E (OE)^2/V
rx=1 13 5.89 4.12 1.77 0.761 1.68
rx=2 13 3.50 5.27 1.77 0.595 1.68
Statistic Z= 1.3, pvalue= 0.194
Alternative hypothesis: survival functions not equal
Trend FH test for rightcensored data
Parameters: rho=1, lambda=0
Distribution: counting process approach
Data: Surv(t2, d3) by group
N Observed Expected OE
group=1 38 16.6 15.7 0.935
group=2 54 15.8 27.1 11.223
group=3 45 25.7 15.4 10.288
Statistic Z= 1.9, pvalue= 0.0272
Alternative hypothesis: decreasing survival functions (higher group implies earlier event times)
Ksample test for rightcensored data
Parameters: rho=1, lambda=1
Distribution: counting process approach
Data: Surv(t2, d3) by as.character(group)
N Observed Expected OE (OE)^2/E (OE)^2/V
as.character(group)=1 38 4.55 3.79 0.769 0.156 1.02
as.character(group)=2 54 4.87 7.50 2.633 0.924 8.99
as.character(group)=3 45 5.41 3.54 1.864 0.981 6.28
Chisq= 9.9 on 2 degrees of freedom, pvalue= 0.00697
Alternative hypothesis: survival functions not equal
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.