Resampling Test for Spectral Densities
test.spectral.RdCompute resampling test for equality, isotropy, and weak stationarity of spectral densities or other qualities of the spectral densities. Can be applied to both vectors and matrices. For more information see DOI: 10.3150/13-BEJ584.
Arguments
- x
First sample. Can be numeric vector or matrix
- y
Second sample. Can be numeric vector or matrix (but must in it's type coincide with x). If isotropy is tested, this is disregarded.
- B
Number of iterations for resampling (the more the better). Can be numeric but must be a whole number
- alpha
Level of significance. Must be numeric value in (0,1)
- hypothesis
Can be one of `"equality", "isotropy", "stationary`
- h1
Kernelbandwidth along first axis defaults to \((NM)^{-1/3}\) (based on our simulation study this turned out to be a good option, if the lattice it not too rectangular)
- h2
Kernelbandwidth along second axis defaults to \((NM)^{-1/3}\)
Examples
# simulating grid-data under H0
K0 <- MA_coef_all(.3)
x <- gridMA(25, 25, K0)
y <- gridMA(25, 25, K0)
# applying the test with 300 iterations and significance 5%
test.spectral(x, y, 300, .05)
#> Test Result for equality type
#> -----------
#> Tn: 3.215607
#> p_value: 0.6266667
#> decision: Accepted H0