Usage
## S3 method for class 'formula':
independence_test(formula, data, subset = NULL,
weights = NULL, \dots)
## S3 method for class 'IndependenceProblem':
independence_test(object,
teststat = c("max", "quad", "scalar"),
distribution = c("asymptotic", "approximate", "exact"),
alternative = c("two.sided", "less", "greater"),
xtrafo = trafo, ytrafo = trafo, scores = NULL,
check = NULL, ...)
## S3 method for class 'table':
independence_test(object,
distribution = c("asymptotic", "approximate"), ...)
Arguments
formula
a formula of the form
y1 + ... + yp ~ x1 + ... + xq | block
where the variables
on the left and right hand side may be measured on arbitrary scales
(including censored ones on the left hand side) and block
is an
data
an optional data frame containing the variables in the
model formula. Alternatively, an object of class
class.ExpressionSet
may be specified. In this case,
all variables in 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 inheriting from class IndependenceProblem
or an
object of class table
.
teststat
a character, the type of test statistic to be applied: either a
standardized scalar test statistic (scalar
), or a
maximum type statistic (max
) or a quadratic form
(quad
).
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 exact
ly or can be approximated by its
asymptotic distribution (asymptotic
)
or via Monte-Carlo resampling (approximate
). Alternativ
xtrafo
a function of transformations (see trafo
)
to be applied to the variables on the right hand side of
formula
, see below. ytrafo
a function of transformations (see trafo
)
to be applied to the variables on the left hand side of
formula
, see below. scores
a named list of scores to be attached to ordered factors. In
case a variable is an unordered factor, it is coerced to
ordered
first.
check
a function to be applied to objects of class
IndendenceTest
in order to check for specific properties
of the data.
...
further arguments to be passed to or from methods. Currently,
none of the additional arguments is passed to any function.