genwwn.test
test for
ARMA processes (including, of course, white noise itself) for
a range of sample sizes.Computes and plots (approximation) to the theoretical power of the
genwwn.test
test using the
genwwn.thpower
function.
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))
A list containing the following components.
The vector of sample sizes.
The computed theoretical powers for each sample size
The autoregressive parameters, NULL if there are none.
The moving average parameters, NULL if there are none.
The innovation variance used
The significance level used
The value of the away.from
argument supplied
The wavelet filter number used
The wavelet family used
Vector of lengths of the series you want to plot theoretical power for.
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.
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.
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.
The theoretical innovation variance (also the variance
of white noise if ar=ma=NULL
.
The nominal size of the test for this theoretical power calculation.
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.
The number of vanishing moments in the Daubechies series of wavelets.
The wavelet family.
If TRUE then informative messages are printed during the progress of the function.
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.)
Delyan Savchev and Guy Nason
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.
Nason, G.P. and Savchev, D. (2014) White noise testing using wavelets. Stat, 3, 351-362. tools:::Rd_expr_doi("10.1002/sta4.69")
genwwn.test
, genwwn.thpower
#
# Plot theoretical power for white noise
#
genwwn.powerplot()
#
# Plot theoretical power for AR(1) process
#
genwwn.powerplot(ar=0.8)
Run the code above in your browser using DataLab