isurvdiff.smax: Maximum values of s for which the IDP test returns a...

Description Usage Arguments Value METHOD References See Also Examples

View source: R/isurvdiff.smax.r

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

1
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:

s

The maximum value of s for which the test returns a determinate decision (H=0 or H=1).

test0

The value returned by isurvdiff(formula,...) for the last test performed. Refer to the help of isurvdiff for more details.

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

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)

IDPSurvival documentation built on May 1, 2019, 10:24 p.m.