Learn R Programming

IDPSurvival (version 1.1)

isurvdiff.smax: 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 Surv(time, status) ~ predictor. A single predictor is admitted.
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 isurvdiff.smax are passed to isurvdiff to perform the test. Refer to the help of isurvdiff for more details about the arguments.

Value

A list with components: A list with components:

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

Surv, isurvdiff.

Examples

Run this code
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)

Run the code above in your browser using DataLab