ddst.exp.test {ddst} | R Documentation |
Data Driven Smooth Test for Exponentiality
Description
Performs data driven smooth test for composite hypothesis of exponentiality.
Usage
ddst.exp.test(x, base = ddst.base.legendre, c = 100, B = 1000, compute.p = F,
Dmax = 5, ...)
Arguments
x |
a (non-empty) numeric vector of data values. |
base |
a function which returns orthogonal system, might be |
c |
a parameter for model selection rule, see package description. |
B |
an integer specifying the number of replicates used in p-value computation. |
compute.p |
a logical value indicating whether to compute a p-value. |
Dmax |
an integer specifying the maximum number of coordinates, only for advanced users. |
... |
further arguments. |
Details
Null density is given by $f(z;gamma) = exp(-z/gamma)$ for z >= 0 and 0 otherwise.
Modelling alternatives similarly as in Kallenberg and Ledwina (1997 a,b), e.g., and estimating $gamma$ by $tilde gamma= 1/n sum_i=1^n Z_i$ yields the efficient score vector $l^*(Z_i;tilde gamma)=(phi_1(F(Z_i;tilde gamma)),...,phi_k(F(Z_i;tilde gamma)))$, where $phi_j$'s are jth degree orthonormal Legendre polynomials on [0,1] or cosine functions $sqrt(2) cos(pi j x), j>=1$, while $F(z;gamma)$ is the distribution function pertaining to $f(z;gamma)$.
The matrix $[I^*(tilde gamma)]^-1$ does not depend on $tilde gamma$ and is calculated for succeding dimensions k using some recurrent relations for Legendre's polynomials and computed in a numerical way in case of cosine basis. In the implementation the default value of c in $T^*$ is set to be 100.
Therefore, $T^*$ practically coincides with S1 considered in Kallenberg and Ledwina (1997 a).
For more details see: http://www.biecek.pl/R/ddst/description.pdf.
Value
An object of class htest
statistic |
the value of the test statistic. |
parameter |
the number of choosen coordinates (k). |
method |
a character string indicating the parameters of performed test. |
data.name |
a character string giving the name(s) of the data. |
p.value |
the p-value for the test, computed only if |
Author(s)
Przemyslaw Biecek and Teresa Ledwina
References
Kallenberg, W.C.M., Ledwina, T. (1997 a). Data driven smooth tests for composite hypotheses: Comparison of powers. J. Statist. Comput. Simul. 59, 101–121.
Kallenberg, W.C.M., Ledwina, T. (1997 b). Data driven smooth tests when the hypothesis is composite. J. Amer. Statist. Assoc. 92, 1094–1104.
Examples
# H0 is true
z = rexp(80,4)
ddst.exp.test (z, compute.p = TRUE)
# H0 is false
z = rchisq(80,4)
(t = ddst.exp.test (z, compute.p = TRUE))
t$p.value