ddst.extr.test {ddst}R Documentation

Data Driven Smooth Test for Extreme Value Distribution

Description

Performs data driven smooth test for composite hypothesis of extreme value distribution.

Usage

ddst.extr.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 ddst.base.legendre for Legendre polynomials or ddst.base.cos for cosine system, see package description.

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)=1/gamma_2 exp((z-gamma_1)/gamma_2- exp((z-gamma_1)/gamma_2))$, z in R.

We model alternatives similarly as in Kallenberg and Ledwina (1997) and Janic-Wroblewska (2004) using Legendre's polynomials or cosines. The parameter $gamma=(gamma_1,gamma_2)$ is estimated by $tilde gamma=(tilde gamma_1,tilde gamma_2)$, where $tilde gamma_1=-1/n sum_i=1^n Z_i + varepsilon G$, where $varepsilon approx 0.577216 $ is the Euler constant and $ G = tilde gamma_2 = [n(n-1) ln2]^-1sum_1<= j < i <= n(Z_n:i^o - Z_n:j^o) $ while $Z_n:1^o <= ... <= Z_n:n^o$ are ordered variables $-Z_1,...,-Z_n$, cf Hosking et al. (1985). The above yields auxiliary test statistic $W_k^*(tilde gamma)$ described in details in Janic and Ledwina (2008), in case when Legendre's basis is applied.

The related 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 numerical methods for cosine functions. In the implementation the default value of c in $T^*$ was fixed to be 100. Hence, $T^*$ is Schwarz-type model selection rule. The resulting data driven test statistic for extreme value distribution is $W_T^*=W_T^*(tilde gamma)$.

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 compute.p=T.

Author(s)

Przemyslaw Biecek and Teresa Ledwina

References

Hosking, J.R.M., Wallis, J.R., Wood, E.F. (1985). Estimation of the generalized extreme-value distribution by the method of probability-weighted moments. Technometrics 27, 251–261.

Janic-Wroblewska, A. (2004). Data-driven smooth test for extreme value distribution. Statistics 38, 413–426.

Janic, A. and Ledwina, T. (2008). Data-driven tests for a location-scale family revisited. J. Statist. Theory. Pract. Special issue on Modern Goodness of Fit Methods. accepted..

Kallenberg, W.C.M., Ledwina, T. (1997). Data driven smooth tests for composite hypotheses: Comparison of powers. J. Statist. Comput. Simul. 59, 101–121.

Examples

library(evd)

# for given vector of 19 numbers
z = c(13.41, 6.04, 1.26, 3.67, -4.54, 2.92, 0.44, 12.93, 6.77, 10.09, 
   4.10, 4.04, -1.97, 2.17, -5.38, -7.30, 4.75, 5.63, 8.84)
ddst.extr.test(z, compute.p=TRUE)

# H0 is true
x = -qgumbel(runif(100),-1,1)
ddst.extr.test (x, compute.p = TRUE)

# H0 is false
x = rexp(80,4)
ddst.extr.test (x, compute.p = TRUE)


[Package ddst version 1.4 Index]