| SurvTest {coin} | R Documentation |
## S3 method for class 'formula':
surv_test(formula, data, subset = NULL, weights = NULL, ...)
## S3 method for class 'IndependenceProblem':
surv_test(object,
alternative = c("two.sided", "less", "greater"),
distribution = c("asympt", "approx", "exact"), ...)
formula |
a formula of the form Surv(time, event) ~ x | block where
time is a positive numeric variable denoting the survival time and
event is a logical being TRUE when the event of interest
was observed and FALSE in case of censoring. x is a factor
with two or more levels giving the corresponding groups. block is an
optional factor for stratification. |
data |
an optional data frame containing the variables in the model formula. |
subset |
an optional vector specifying a subset of observations to be used. |
weights |
an optional formula of the form ~ w defining
integer valued weights for the observations. |
object |
an object of class IndependenceProblem. |
alternative |
a character, the alternative hypothesis must be
one of "two.sided" (default), "greater" or
"less". You can specify just the initial letter. |
distribution |
a character, the null distribution of the test statistic
can be computed exactly or can be approximated by its
asymptotic distribution (asympt)
or via Monte-Carlo resampling (approx). |
... |
further arguments to be passed to or from methods. |
The null hypothesis of the equality of the distribution of the survival
functions in the groups induced by x is tested.
An object inheriting from class IndependenceTest-class with
methods show, statistic, expectation,
covariance and pvalue. The null distribution
can be inspected by pperm, dperm,
qperm and support methods.
data(ocarcinoma, package = "coin")
surv_test(Surv(time, event) ~ stadium, data = ocarcinoma,
distribution = "exact")