Usage
isurvdiff(formula, data, groups=c(1,2), s=0.25, alternative = c("two.sided", "less", "greater"), exact=NULL, level = 0.95, display=TRUE, nsamples=10000, rope=0, tmax=NULL)
Arguments
formula
a formula expression of the form Surv(time, status) ~ predictor.
A single predictor is admitted.
data
an optional data frame in which to interpret the variables occurring in the
formula.
groups
a vector of two element indicating which value of the predictor
represents groups 1 and 2.
s
sets the value of the prior strength s of the Dirichlet Process.
alternative
define the direction of the test:
"greater" --evaluates the hypothesis P(X < Y)>1/2, i.e., returns H=1
if the lower probability of the hypothesis is larger than
level, H=0 if the upper probability is smaller than
level and H=2 if the lower and upper probabilities
encompass level;
"less" -- evaluates the hypothesis P(Y < X)>1/2;
"two.sided" -- performs a two-sided Bayesian test, i.e., returns H=1 if
1/2 is not included between the left bound of the
lower and the right bound of the upper level
HPD credible intervals, H=0 if 1/2 is included in both
the upper and lower credible intervals, H=2 otherwise.
exact
computes the posterior probability if value is TRUE,
or uses a normal approximation if value is FALSE.
If you omit this argument, isurvdiff uses the exact method
if at least one group has less than 100 samples
and the approximate one otherwise.
level
sets the significance level alpha = 1-level of the test.
display
determines whether the posterior distributions of P(X
nsamples
if exact=TRUE, sets the number of samples used in the Monte Carlo
computation of the posterior distributions. For faster but less accurate
results, one can tune down this parameter. For more accurate, one might
increase it.
rope
introduces a (symmetric) Region of Practical
Equivalence (ROPE) around 1/2, i.e., [1/2-value,1/2+value].
tmax
whether to consider the difference in survival up to time tmax.
NULL is the default and means without limit.