Description Usage Arguments Details Value See Also Examples
Performs the robust K-sign depth test, which tests whether a statistical model fits to some data.
1 2 3 4 5 6 7 | depth.test(x, ...)
## Default S3 method:
depth.test(x, K, ...)
## S3 method for class 'formula'
depth.test(formula, data, params, K, ...)
|
x |
[ |
... |
[any] further arguments in the formula-method. Arguments are passed
to the |
K |
[ |
formula |
[ |
data |
[ |
params |
[ |
In the default method a residual vector is given and it is tested whether this residual vector comes from a model that describes the data sufficiently. With the formula interface it is possible to give a formula and a parameter vector, so that a linear model with the given parameters is fitted and the residuals are calculated with this model.
At the moment only linear models for the formula interface are supported!
The parameter K of the sign depth has to be a natural number. Currently only K = 2, 3, 4, 5 are supported!
The quantiles used for calculating the p-value of the test are simulation based.
For more information see qdepth
.
A list with class "htest"
containing the following components:
statistic
the value of the K-sign depth.
parameter
the parameter K of the K-sign depth.
p.value
the p-value for the test.
alternative
a character string describing the alternative hypothesis.
data.name
a character string giving the name of the data.
method
a character string describing the method.
qdepth
, calcDepth
, multiSorting
,
sign.test
, f.test
1 2 3 | depth.test(rnorm(30), 3)
depth.test(y ~ ., data = data.frame(x = rnorm(30), y = rnorm(30)),
params = c(1, 1), K = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.