TOS2D {LS2Wstat} | R Documentation |
Perform bootstrap stationarity test for images.
Description
For a given image this function performs bootstrapping to test the hypothesis that the image is stationary.
Usage
TOS2D(image, detrend = FALSE, nsamples = 100, theTS = avespecvar, verbose = TRUE,...)
Arguments
image |
The image you want to analyse. |
detrend |
This specifies whether to use Tukey's median polish to remove the image trend. |
nsamples |
Number of bootstrap simulations to carry out. |
theTS |
Specifies the particular test statistic to be used. This function should measure the departure from constancy of the wavelet spectrum. |
verbose |
If TRUE informative messages are printed. |
... |
Any other arguments supplied to the LS2W function |
Details
This function first of all crops the image (if necessary) to have dyadic dimensions. The test statistic (theTS
), which should be based upon the local wavelet spectrum, is calculated for this original image and the local wavelet spectrum under the null hypothesis is calculated, so as to be able to simulate realisations under the null hypothesis. nsamples
images are simulated and test statistic is found for each. The function returns all the test statistic values which may be passed to getpval
in order to find a p-value for the test. For full details on this testing procedure see Taylor et al. (2014).
Value
A list with the following components:
data.name |
The name of the image analysed. |
samples |
A vector of length |
statistic |
The name of the test statistic used. |
p.value |
The bootstrap p-value for the test. |
Author(s)
Sarah L. Taylor
References
Taylor, S.L., Eckley, I.A., and Nunes, M.A. (2014) A Test of Stationarity for Textured Images. Technometrics, 56 (3), 291-301.
See Also
Examples
# Generate a stationary image
#
testimage <- matrix(rnorm(64*64), nrow=64, ncol=64)
#
#Run test of stationarity
## Not run: TestofStat<-TOS2D(testimage)