TOS2D: Perform bootstrap stationarity test for images.

TOS2DR 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 cddews.

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

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

avespecvar, getpval

Examples

# 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 Sept. 17, 2023, 9:06 a.m.