Description Usage Arguments Value METHOD References See Also Examples
View source: R/isurvdiff.smax.r
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.
1 | isurvdiff.smax(formula, ..., verbose=FALSE, accuracy=0.05, smax=12)
|
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 |
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 |
This function implements the IDP sum-rank test describe in Mangili and others (2014).
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.
1 2 3 4 5 6 7 8 9 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.