Performs data driven smooth test for composite hypothesis of exponentiality. 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).

ddst.exp.test(
  x,
  base = ddst.base.legendre,
  d.n = 10,
  c = 100,
  nr = 1e+05,
  compute.p = TRUE,
  alpha = 0.05,
  compute.cv = TRUE,
  ...
)

Arguments

x

a (non-empty) numeric vector of data values

base

a function which returns an orthonormal system, possible choice: ddst.base.legendre for the Legendre polynomials and ddst.base.cos for the cosine system

d.n

an integer specifying the maximum dimension considered, only for advanced users

c

a calibrating parameter in the penalty in the model selection rule

nr

an integer specifying the number of runs for a p-value and a critical value computation if any

compute.p

a logical value indicating whether to compute a p-value or not

alpha

a significance level

compute.cv

a logical value indicating whether to compute a critical value corresponding to the significance level alpha or not

...

further arguments

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.

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

set.seed(7) # H0 is true z <- rexp(80,4) t <- ddst.exp.test (z, compute.p = TRUE, d.n = 10) t
#> #> Data Driven Smooth Test for Expotentiality #> #> data: z, base: ddst.base.legendre, c: 100, d.n: 10 #> W*T* = 2.1593, T* = 1, p-value = 0.1748 #>
plot(t)
# H0 is false z = rchisq(80,4) (t = ddst.exp.test (z, compute.p = TRUE, d.n = 10))
#> #> Data Driven Smooth Test for Expotentiality #> #> data: z, base: ddst.base.legendre, c: 100, d.n: 10 #> W*T* = 15.543, T* = 1, p-value = 0.00484 #>
t$p.value
#> [1] 0.00484
plot(t)