TOS2D: Perform bootstrap stationarity test for images.

TOS2DR Documentation

Perform bootstrap stationarity test for images.


For a given image this function performs bootstrapping to test the hypothesis that the image is stationary.


TOS2D(image, detrend = FALSE, nsamples = 100, theTS = avespecvar, verbose = TRUE,...)



The image you want to analyse.


This specifies whether to use Tukey's median polish to remove the image trend.


Number of bootstrap simulations to carry out.


Specifies the particular test statistic to be used. This function should measure the departure from constancy of the wavelet spectrum.


If TRUE informative messages are printed.


Any other arguments supplied to the LS2W function cddews.


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).


A list with the following components:

The name of the image analysed.


A vector of length nsamples+1. The first entry is the value of the test statistic computed on the original image while the remaining entries are test statistic values for the simulated images.


The name of the test statistic used.


The bootstrap p-value for the test.


Sarah L. Taylor


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

avespecvar, getpval


# Generate a stationary image
testimage <- matrix(rnorm(64*64), nrow=64, ncol=64)
#Run test of stationarity

## Not run: TestofStat<-TOS2D(testimage)

LS2Wstat documentation built on May 11, 2022, 5:10 p.m.