FHtestics {FHtest} | R Documentation |
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 \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 |
R |
Numeric vector of the right endpoints of the censoring intervals (equivalent to the second element of |
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. With this method, lambda has to be zero. |
alternative |
Character giving the type of alternative hypothesis for two-sample and trend tests: |
tol |
Tolerance for the calculation of the g-inverse. Values less than |
icFIT |
A precalculated |
initfit |
An object of class |
icontrol |
List of arguments for controling the NPMLE algorithm in call to |
Lin |
Logical vector: should |
Rin |
Logical vector: should |
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. |
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 |
diff |
The weighted observed minus expected number of events in each group. |
scores |
Vector with the same length as |
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 |
d2L.dgam2 |
Second derivative of the log-likelihood with respect to |
d2L.dBdgam |
Derivative of the log-likelihood with respect to |
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 |
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)