| prodcomb | R Documentation |
This function takes the cfs vector and splits it
into two halves. The first half contains the wavelet coefficients
for the alpha linear combination function, and the second
half for the beta one. Then the functions themselves are
generated by using the coeftofn function. Then, the
coefficient functions are multiplied by the respective time
series (tsx by alpha and tsy by beta)
and the result returned.
prodcomb(cfs, tsx, tsy, filter.number = 1,
family = c("DaubExPhase", "DaubLeAsymm"), all = FALSE)
cfs |
Wavelet coefficients of the two combination functions. The coefficients for alpha/beta combination functions are stored in the first/last half of the vector. |
tsx |
The x time series to combine |
tsy |
The y time series to combine |
filter.number |
The wavelet filter to use to obtain functions from coefficients |
family |
The wavelet family to do the same. |
all |
If TRUE then a list containing the combined series
in the component |
This function is called by findstysols and makes
use of coeftofn to turn coefficients into a
function used in the combination.
If all=TRUE then a list with the following components:
lcts |
The combined series, |
alpha |
The |
beta |
The |
If all=FALSE then only lcts is returned.
Guy Nason
Cardinali, A. and Nason, Guy P. (2013) Costationarity of Locally Stationary Time Series Using costat. Journal of Statistical Software, 55, Issue 1.
Cardinali, A. and Nason, G.P. (2010) Costationarity of locally stationary time series. J. Time Series Econometrics, 2, Issue 2, Article 1.
findstysols, coeftofn
#
# Toy example
#
tmp.a <- c(1, -1)
tmp.b <- c(0.5, 0.5)
#
# Generate toy time series
#
xxx <- rnorm(256)
yyy <- rnorm(256)
#
# Combine xxx and yyy using the functions produced by inverse wavelet
# transform of tmp.a and tmp.b
#
## Not run: tmp <- prodcomb(c(tmp.a, tmp.b), tsx=xxx, tsy=yyy)
#
# E.g. plot combination
#
## Not run: ts.plot(tmp)
#
# Potentially test its stationarity.... etc
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.