genwwn.powerplot {hwwntest}R Documentation

Plot (approximation) to the theoretical power of the genwwn.test test for ARMA processes (including, of course, white noise itself) for a range of sample sizes.

Description

Computes and plots (approximation) to the theoretical power of the genwwn.test test using the genwwn.thpower function.

Usage

genwwn.powerplot(N =c(32, 64, 128, 256, 512, 1024), ar = NULL,
	ma = NULL, plot.it = TRUE, sigsq = 1, alpha = 0.05,
	away.from = "standard", filter.number = 10,
	family = "DaubExPhase", verbose = FALSE, ylim=c(0,1))

Arguments

N

Vector of lengths of the series you want to plot theoretical power for.

ar

Autoregressive parameters. A vector with p entries for AR(p) with the first entry being the value for lag-one term (alpha_1), the second entry being the value for the lag-two term (alpha_2) etc. If this argument is NULL then there are no AR terms.

ma

Similar to the ar argument except for MA terms. A vector of length q for MA(q) parameters, with first entry being beta_1, the second being beta_2, etc. If this argument is NULL then there are no MA terms.

plot.it

If TRUE then a plot of theoretical power against sample size is produced. The computed theoretical powers for the fixed sample sizes specified by N are plotted as crosses. The crosses are then joined by a dashed line to indicate a likely trajectory of the theoretical power for sample sizes not computed.

sigsq

The theoretical innovation variance (also the variance of white noise if ar=ma=NULL.

alpha

The nominal size of the test for this theoretical power calculation.

away.from

Describes how many fine scales to exclude, the same as in genwwn.test. This can be an integer up to the number of scales. However, mostly you can leave this at "standard" where the scales calculation is automatically determined.

filter.number

The number of vanishing moments in the Daubechies series of wavelets.

family

The wavelet family.

verbose

If TRUE then informative messages are printed during the progress of the function.

ylim

The theoretical power is a probability and lies in the range of zero to one and this argument specifies those limits for the vertical axis. These can be changed to whatever you like. E.g. if all the powers were similar (e.g. if the null series was white noise and alpha=0.05 then the theoretical powers would all be approximately 0.05.)

Details

Function calculates the value of the power function at the specified sample sizes using the genwwn.thpower function. Then these values are plotted and returned.

Value

A list containing the following components.

N

The vector of sample sizes.

power

The computed theoretical powers for each sample size

ar

The autoregressive parameters, NULL if there are none.

ma

The moving average parameters, NULL if there are none.

sigsq

The innovation variance used

alpha

The significance level used

away.from

The value of the away.from argument supplied

filter.number

The wavelet filter number used

family

The wavelet family used

Author(s)

Delyan Savchev and Guy Nason

References

Nason, G.P. and Savchev, D. (2014) White noise testing using wavelets. Stat, 3, 351-362. doi:10.1002/sta4.69

See Also

genwwn.test, genwwn.thpower

Examples

#
# Plot theoretical power for white noise
#
genwwn.powerplot()
#
# Plot theoretical power for AR(1) process
#
genwwn.powerplot(ar=0.8)

[Package hwwntest version 1.3.2 Index]