isurvdiff.smax {IDPSurvival} | R Documentation |
Maximum values of s for which the IDP test returns a determinate decision
Description
Search for the maximum values of parameter s for which the IDP test isurvdiff(formula,...)
issues a determinate decision.
The function test values of s up to the parameter smax. If for smax the IDP test is still determinate,
isurvdiff.smax
returns list(smax,testout). If for s=0 the test is already indeterminate,
isurvdiff.smax
returns list(-1,testout), where testout is the last executed test.
Usage
isurvdiff.smax(formula, ..., verbose=FALSE, accuracy=0.05, smax=12)
Arguments
formula |
a formula expression of the form |
verbose |
whether to display each value of s that is tried |
accuracy |
to which precision s should be computed |
smax |
to which maximum value s should be tried |
... |
All arguments of |
Value
A list with components:
s |
The maximum value of s for which the test returns a determinate decision (H=0 or H=1). |
test0 |
The value returned by |
METHOD
This function implements the IDP sum-rank test describe in Mangili and others (2014).
References
Benavoli, A., Mangili, F., Zaffalon, M. and Ruggeri, F. (2014). Imprecise Dirichlet process with application to the hypothesis test on the probability that X < Y. ArXiv e-prints, http://adsabs.harvard.edu/abs/2014arXiv1402.2755B.
Mangili, F., Benavoli, A., Zaffalon, M. and de Campos, C. (2014). Imprecise Dirichlet Process for the estimate and comparison of survival functions with censored data.
See Also
Examples
data(lung,package='survival')
lung <- lung[1:40,] # reduced data set just to ensure that the
# example is very fast to run for building the package
test <-isurvdiff.smax(Surv(time,status)~sex,lung,groups=c(1,2),
alternative = 'two.sided', nsamples=1000)
# better to use larger value of nsamples
# this small value is to run it quickly
print(test$test0)
cat("Maximum s giving the same decision: ",test$s)