WiSEHypothesisTest: WiSE Wavelet Coefficients: Linear Hypothesis Test

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculate the p-value for a hypothesis test regarding a linear relationship between wavelet coefficients from two data series. See Details for a precise description.

Usage

1
2
3
4
WiSEHypothesisTest(X, Y, J0, R=100, popParam = c(0, 1), XParam = c(NA, NA), 
                   YParam = c(NA, NA), TauSq = "log", bootDistn = "normal", 
                   wavFam = "DaubLeAsymm", wavFil = 8, wavBC = "periodic", 
                   plot = TRUE, ...)

Arguments

X

vector of equally-spaced data. This must be of length T=2^J where J>2 is an integer. It is required that length(X)=length(Y). The vector should contain only numeric values and be non-missing. See the Details section for a description of the relationship between X and Y.

Y

vector of equally-spaced data. This must be of length T=2^J where J>2 is an integer. It is required that length(X)=length(Y). The vector should contain only numeric values and be non-missing. See the Details section for a description of the relationship between X and Y.

J0

wavelet coefficient threshold level. Allowed values are integers between 0 and J-2. Note, J is related to the data series length: T=2^J.

R

number of WiSE bootstrap samples. Allowed value is a positive integer. Default is 100.

popParam

hypothesized parameter values. Allowed input is a vector of length 2 which is non-missing and contains numeric entries. The first entry of the vector is the hypothesized value of the population intercept. The second entry of the vector is the hypothesized value of the population slope.

XParam

estimated linear parameter values (in time) from X. Allowed input is a vector of length 2 which is completely missing or contains numeric entries. The first entry of the vector is the intercept for X and the second entry is the slope for X. These are the estimated slope and intercept in the data – correspond to estimates of γ_{x0} and γ_{x1} in the Details section. If missing, these are estimated using least squares. If the data is modified with padVector or padMatrix, it is recommended that the user supply the linearParam output here.

YParam

estimated linear parameter values (in time) from Y. Allowed input is a vector of length 2 which is completely missing or contains numeric entries. The first entry of the vector is the intercept for Y and the second entry is the slope for Y. These are the estimated slope and intercept in the data – correspond to estimates of γ_{y0} and γ_{y1} in the Details section. If missing, these are estimated using least squares. If the data is modified with padVector or padMatrix, it is recommended that the user supply the linearParam output here.

TauSq

scale parameter for the bootstrap. Allowed values are "log", "log10", "sqrt", "1", or "2/5". The scale parameter is related to the length of the data series. For example, "log" implies a value of the scale parameter, τ, of √{log(T)}. The value of "1" corresponds to the case of wild bootstrap.

bootDistn

the distribution for the bootstrap. Allowed values are "normal", "uniform", "laplace", "lognormal", "gumbel", "exponential", "t5", "t8", and "t14". This draws iid random samples from the specified distribution for the wild bootstrap where the random variables have mean 0 and variance 1. For example, "t5" is Student's t-distribution with 5 degrees of freedom.

wavFam

wavelet family. Allowed values are "DaubLeAsymm" and "DaubExPhase" – Daubechies Least Asymmetric and Daubechies Extremal Phase. This is the family used within the wavethresh package.

wavFil

wavelet filter number. Allowed values are integers between 4 and 10 when wavFam="DaubLeAsymm" or integers between 1 and 10 when wavFam="DaubExPhase". These correspond to the number of vanishing moments of the wavelet. This is the filter.number used within the wavethresh package.

wavBC

wavelet boundary condition. Allowed values are "periodic" and "symmetric". This is the bc used within the wavethresh package.

plot

logical. If TRUE, a plot of the bootstrap sample of the linear parameters (generated under the null hypothesis) and the estimated parameters from the data is shown.

...

additional graphical arguments. See plot, plot.default.

Details

Given 2 vectors of equally-spaced data of length T=2^J for a positive integer, J, we assume the following models:

X = γ_{x0} 1 + γ_{x1} t + Wγ_x + e_x

Y = γ_{y0} 1 + γ_{y1} t + Wγ_y + e_y

where Y and X are the data vectors, linear parameters in time (t) are γ_{x0}, γ_{x1}, γ_{y0} and γ_{y1}.

The γ_x and γ_y are the wavelet coefficients (scaling and filter) and W is the DWT for a fixed wavelet basis. Note, in many cases of the DWT, the scaling coefficient is equivalent to γ_{x0}, γ_{y0}, and thus, estimated there.

In this function, we consider a linear relationship between the wavelet coefficients. Specifically, we hypothesize a relationship

γ_y = α 1 + β γ_x

The null hypothesis is

H_0: α = m, β=n

for real numbers m, n. The user specifies popParam=c(m, n).

The WiSE bootstrap sample is created under the null hypothesis for a set threshold, J0=j. The sampling scheme is described in detail in Braverman et al. The distributon of the bootstrap sample of the parameters allows for calculation of a p-value associated with the null hypothesis.

Some notation to aid in understanding outputs:

1) a, b: estimates of α, β from the data wavelet coefficients

2) a*, b*: estimates of α, β from the bootstrap wavelet coefficients

3) g_{xj}, g_{yj}: estimates of γ_x, γ_y from the data at the threshold J0=j

4) g*_{xj}, g*_{yj}: estimates of γ_x, γ_y from the bootstrap sample at the threshold J0=j

Value

AsymptoticPValue

the asymptotic p-value based upon Hotelling's T^2.

BootstrapPValue

the bootstrap p-value.

dataSlope

the estimated slope of the wavelet coefficients from the data. In the notation from Details, b

dataIntercept

the estimated intercept of the wavelet coefficients from the data. In the notation from Details, a

bootSlope

the estimated slopes of the wavelet coefficients from the bootstrap samples. In the notation from Details, b*. This is a vector of length R.

bootIntercept

the estimated intercepts of the wavelet coefficients from the bootstrap samples. In the notation from Details, a*. This is a vector of length R.

YWavelet

the estimated wavelet coefficients from the Y data. In the notation from Details, g_{yj}. This is a vector of length 2^(J0 + 1) - 1. The first entry is the level 0 coefficient, ..., final entries are the level J0 coefficients.

XWavelet

the estimated wavelet coefficients from the X data. In the notation from Details, g_{xj}. This is a vector of length 2^(J0 + 1) - 1. The first entry is the level 0 coefficient, ..., final entries are the level J0 coefficients.

bootYWavelet

the estimated wavelet coefficients from the Y bootstrap sample. In the notation from Details, g*_{yj}. This is a matrix with R rows and 2^{J0 + 1} - 1 columns which correspond to the wavelet coefficients. The first column is the level 0 filter coefficient, ..., final columns are the level J0 filter coefficients.

bootXWavelet

the estimated wavelet coefficients from the X bootstrap sample. In the notation from Details, g*_{xj}. This is a matrix with R rows and 2^{J0 + 1} - 1 columns which correspond to the wavelet coefficients. The first column is the level 0 filter coefficient, ..., final columns are the level J0 filter coefficients.

Author(s)

Megan Heyman

References

The WiSE bootstrap hypothesis test is implemented as an analysis tool in Braverman, A. et al. "Probabilistic Climate Model Evaluation" (in progress).

See Also

padMatrix, padVector, wavethresh-package

Examples

1
2
3
4
5
6
7
##Test whether \alpha=0 and \beta=1 for AIRS and IPSL Run 1 at 60E
## R=10 bootstrap samples is not recommended.  For demonstration only.
data(CM20N20S60E)
padData <- padMatrix(CM20N20S60E)
hypTest <- WiSEHypothesisTest(padData$xPad[,1], padData$xPad[,2], J0=5, R=10, 
                              XParam=padData$linearParam[,1], YParam=padData$linearParam[,2], 
                              plot=TRUE)

WiSEBoot documentation built on May 2, 2019, 12:35 p.m.