modwt(X, filter="la8", n.levels, boundary="periodic", fast=TRUE)modwt, which is an S4 object with
slotswt.filter object containing information for
the filter used in the decomposition. See help(wt.filter) for
details.X, in matrix format."ts", "mts",
"numeric", "matrix", or "data.frame".X. This is useful if X is an
object of class ts or mts and it is desired to retain
relevant time information. If the original time series, X, is
a matrix or has no attributes, then attr.X is an empty list.align function, with the modwt object as input.aligned is FALSE) and will be set to true if the
modwt object is phase shifted via the align function
and center of energy method.boundary="periodic" the resulting wavelet
and scaling coefficients are computed without making changes to the
original series - the pyramid algorithm treats X as if it is
circular. However, when boundary="reflection" a call is made to
extend.series, resulting in a new series which is reflected to
twice the length of the original series. The wavelet and scaling
coefficients are then computed by using a periodic boundary condition
on the reflected sereis, resulting in twice as many wavelet and
scaling coefficients at each level.dwt,
wt.filter.# obtain the two series listed in Percival and Walden (2000), page 42
X1 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,.7,.9,0,.3)
X2 <- c(.2,-.4,-.6,-.5,-.8,-.4,-.9,0,-.2,.1,-.1,.1,-.7,.9,0,.3)
# combine them and compute DWT
newX <- cbind(X1,X2)
wt <- dwt(newX, n.level=3, boundary="reflection", fast=FALSE)Run the code above in your browser using DataLab