ictest function performs several different tests for
interval censored data, and the wlr_trafo function takes interval censored data and returns one of several rank-based
scores as determined by the scores option. The default for ictest is to perform a permutation test, either asymptotic or exact
depending on the size of the data. Other types of tests (the scores test form or multiple imputation form) are supported.
The 5 different score options allow different tests including
generalizations to interval censored data of 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","normal","general"),
rho=NULL,
alternative= c("two.sided", "less", "greater"),
icFIT=NULL,
initfit=NULL,
icontrol=icfitControl(),
exact=NULL,
method=NULL,
methodRule=methodRuleIC1,
mcontrol=mControl(),
Lin=NULL,
Rin=NULL,
dqfunc=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","normal","general"),
icFIT = NULL, initfit =NULL, control=icfitControl(),
Lin=NULL,Rin=NULL,dqfunc=NULL,...)
## S3 method for class 'Surv':
wlr_trafo(x,\dots)
## S3 method for class 'data.frame':
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.wlr_trafo.method or
of result of methodRule. One of
`pclt', 'exact.network', etc.icFIT is only for saving computational time,
no checks are made to determine if the icFIT is in fact the correct one. Thus you may get
wrong answers with no warnings if you input the wrong icFIT object. The safer way to save
computational time is to input into initfit either a precalculated icfit object or
an icsurv object from a function in the Icens package such as EMICM.
When this is done, you will get either the correct answer or a warning even when you input a bad guess for the
initfit. Additionally, you may specify a function name for initfit. The default is NULL which
uses a simple initial fit function (it is a weighted average of the A matrix, see icfit.default code).
A fast but somewhat unstable function uses initcomputeMLE
which uses the computeMLE function from the 'MLEcens'
package.
See help for icfit for details on the initfit option.function(x){ dnorm(qnorm(x))} gives
the same results as scores='normal' or with dqfunc equal to function(x){ dlogis(qlogis(x))} gives
the same results (theoretically, but perhaps not exactly when calculated) as scores='wmw'.
For censored data two common likelihoods are the
marginal likelihood of the ranks and the
likelihood with nuisance parameters for the
baseline survival. Here we use the latter
likelihood (as in Finkelstein, 1986, Fay, 1996,
and Sun, 1996).
Because of theoretical difficulties (discussed below), the default method (method=NULL with methodRule=methodRuleIC1) is to
perform a permutation test on the scores. 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 (see perm ). Note that there are two
exact two-sided methods and the default is to essentially double the smaller of the one-sided p-values (tsmethod='central'), while the
default in the coin package is different (see mControl and the tsmethod option).
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.
Fay and Shaw (2010) gives the mathematical expressions for the different tests.icfit, EMICM, computeMLE## 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