EstBetaCov {locits} | R Documentation |
Compute estimate of wavelet periodogram and the estimate's covariance matrix.
Description
An estimate of the wavelet periodogram at a location
nz
is generated. This is obtained by first computing the
empirical raw wavelet periodogram by squaring the results of
the nondecimated wavelet transform of the time series. Then
a running mean smooth is applied.
Usage
EstBetaCov(x, nz, filter.number = 1, family = "DaubExPhase", smooth.dev = var,
AutoReflect = TRUE, WPsmooth.type = "RM", binwidth = 0, mkcoefOBJ,
ThePsiJ, Cverbose = 0, verbose = 0, OPLENGTH = 10^5, ABB.tol = 0.1,
ABB.plot.it = FALSE, ABB.verbose = 0, ABB.maxits = 10, do.init = TRUE,
truedenom=FALSE, ...)
Arguments
x |
The time series for which you wish to have the estimate for. |
nz |
The time point at which you want the estimate computed at. This is an integer ranging from one up to the length of the time series. |
filter.number |
The analysis wavelet (the wavelet periodogram is computed using this to form the nondecimated wavelet coefficients) |
family |
The family of the analysis wavelet. |
smooth.dev |
The deviance function used in smoothing via the
internal call to the |
AutoReflect |
Whether better smoothing is to be obtained by
AutoReflection to mitigate the effects of using periodic
transforms on non-periodic data. See |
WPsmooth.type |
The type of wavelet periodogram smoothing. For here
leave the option at |
binwidth |
The running mean length. If zero then a good bandwidth
will be chosen using the |
mkcoefOBJ |
If this argument is missing then it is computed internally
using the |
ThePsiJ |
As for |
Cverbose |
This function called the C routine |
verbose |
If TRUE then debugging messages from the R code are produced. |
OPLENGTH |
Subsidiary parameters for potential call to
|
ABB.tol |
Tolerance to be passed to |
ABB.plot.it |
Argument to be passed to |
ABB.verbose |
Argument to be passed to |
ABB.maxits |
Argument to be passed to |
do.init |
Initialize stored statistics, for cache hit rate info. |
truedenom |
If TRUE use the actual number of terms in the sum as the denominator in the formula for the calculation of the covariance of the smoothed periodogram. If FALSE use the (2s+1) |
... |
Other arguments that are passed to the
|
Details
First optionally computes a good bandwidth using the
AutoBestBW
function. Then
computes raw wavelet periodogram using ewspec3
using running mean smoothing with the binwidth
bandwith
(which might be automatically chosen). This computes the estimate
of the wavelet periodogram at time nz
. The covariance matrix
of this estimate is then computed in C using the
CstarIcov
function and this is returned.
Value
A list with two components:
betahat |
A vector of length |
Sigma |
A matrix of dimensions |
Author(s)
Guy Nason
References
Nason, G.P. (2013) A test for second-order stationarity and approximate confidence intervals for localized autocovariances for locally stationary time series. J. R. Statist. Soc. B, 75, 879-904. doi:10.1111/rssb.12015
See Also
Examples
#
# Small example, not too computationally demanding on white noise
#
myb <- EstBetaCov(rnorm(64), nz=32)
#
# Let's see the results (of my run)
#
## Not run: myb$betahat
#[1] 0.8323344 0.7926963 0.7272328 1.3459313 2.1873395 0.8364632
#
# For white noise, these values should be 1 (they're estimates)
## Not run: myb$Sigma
# [,1] [,2] [,3] [,4] [,5] [,6]
#[1,] 0.039355673 0.022886994 0.008980497 0.01146325 0.003211176 0.001064377
#[2,] 0.022886994 0.054363333 0.035228164 0.06519112 0.017146883 0.006079162
#[3,] 0.008980497 0.035228164 0.161340373 0.38326812 0.111068916 0.040068318
#[4,] 0.011463247 0.065191118 0.383268115 1.31229598 0.632725858 0.228574601
#[5,] 0.003211176 0.017146883 0.111068916 0.63272586 1.587765187 0.919247252
#[6,] 0.001064377 0.006079162 0.040068318 0.22857460 0.919247252 2.767615374
#
# Here's an example for T (length of series) bigger, T=1024
#
## Not run: myb <- EstBetaCov(rnorm(1024), nz=512)
#
# Let's look at results
#
## Not run: myb$betahat
# [1] 1.0276157 1.0626069 0.9138419 1.1275545 1.4161028 0.9147333 1.1935089
# [8] 0.6598547 1.1355896 2.3374615
#
# These values (especially for finer scales) are closer to 1
#