Cvarip2 {locits} | R Documentation |
Computes variance of Haar wavelet coefficients of wavelet periodogram using C code.
Description
Performs precisely the same role as varip2
except it is implemented internally using C code and hence
is much faster.
Usage
Cvarip2(i, p, ll, S, Pmat, PsiJL)
Arguments
i |
Scale parameter of Haar wavelet analyzing periodogram. Scale 1 is the finest scale. |
p |
Location parameter of Haar wavelet analyzing periodogram |
ll |
Scale of the raw wavelet periodogram being analyzed. |
S |
Estimate of the spectrum, under the assumption of stationarity.
So, this is just a vector of (possibly) J scales (which is often
the usual spectral estimate averaged over time). Note: that the
main calling function, |
Pmat |
Matrix version of autocorrelation wavelet computed
using the |
PsiJL |
True length of the autocorrelation wavelets
in the |
Value
The list returned from the .C
calling function.
The only object of real interest is the ans
component
which contains the variance.
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
#
# See example from varip2
#
#
my.Pmat <- PsiJmat(-5, filter.number=1, family="DaubExPhase")
my.PsiJ <- PsiJ(-5, filter.number=1, family="DaubExPhase")
my.PsiJL <- sapply(my.PsiJ, "length")
Cvarip2(i=1, p=10, ll=2, S=c(1/2,1/4,1/8,1/16,1/32),
Pmat=my.Pmat, PsiJL=my.PsiJL)
#
# Gives answer 1.865244, which is the same as given in the example for varip2