ictest function performs several different tests for
interval censored data, and the wlr_trafo function gives the
associated transformation to scores. The default tests use the permutation
form of the test (the method option tells whether it is asymptotic or exact), but the score test
form and multiple imputation form are supported.
The 3 different scores give three different tests
that generalize to interval censored data either the
Wilcoxon-Mann-Whitney test
(scores="wmw") or the logrank test (scores="logrank1" or
scores="logrank2") (see details).
The function calls the icfit function, if an icfit object is not provided.## S3 method for class 'default':
ictest(L, R, group,
scores = c("logrank1","logrank2","wmw"),
rho=NULL,
alternative= c("two.sided", "less", "greater","two.sidedAbs"),
icFIT=NULL,
initfit=NULL,
icontrol=icfitControl(),
exact=NULL,
method=NULL,
methodRule=methodRuleIC1,
mcontrol=mControl(),
Lin=NULL,
Rin=NULL,...)
## S3 method for class 'formula':
ictest(formula, data, subset, na.action, \dots)
## S3 method for class 'default':
wlr_trafo(x, R=NULL,
scores = c("logrank1", "logrank2", "wmw"),
icFIT = NULL, initfit = NULL, control=icfitControl(),
Lin=NULL,Rin=NULL,...)
## S3 method for class 'Surv':
wlr_trafo(x,\dots)icFIT is not nullicfitControl)SurvmethodRuleIC1. (see details in perm)mControl)icfitControl)wlr_trafo returns only the numeric vector of scores, while
ictest returns an object of class `ictest', which is a list with the following values.icfit is only for saving computational time,
no checks are made to determine if the icfit is in fact the correct one. Thus you will get
wrong answers with no warnings if you input the wrong icfit object. The safer way to save
computational time is to input the precalculated icfit object into initfit. When this
is done, you will get either the correct answer or a warning even when you input a bad guess for the
initfit.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 (see perm ).
Another method is to perform a standard score test (method="scoretest").
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 then
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.
Another method is to use multiple imputation, or within subject resampling (method="wsr.HLY") (Huang, Lee, and Yu, 2008).
This method samples interval censored observations from the nonparametric distribution, then performs the usual
Martingale-based variance. A different possibility is to use a permutational central limit theorem variance for each
wsr (method="wsr.pclt") or use Monte Carlo replications to get an possibly exact method from each
within subject resampling (method="wsr.mc").
Note that when icfit and ictest are used on right
censored data, because of the method of estimating
variance is different, even Sun's method does not
produce exactly the standard logrank test results.
There are some typos in Appendix II of Fay (1999),
see the correction.
permControlicfit## perform a logrank-type test using the permutation form of the test
data(bcos)
testresult<-ictest(Surv(left,right,type="interval2")~treatment, scores="logrank1",data=bcos)
testresult
## perform a Wilcoxon rank sum-type test
## using asymptotic permutation variance
left<-bcos$left
right<-bcos$right
trt<-bcos$treatment
## save time by using previous fit
ictest(left,right,trt, initfit=testresult$fit, method="pclt",scores="wmw")Run the code above in your browser using DataLab