Learn R Programming

W2CWM2C (version 1.0)

WMC: Wavelet multiple correlation (multivariate case).

Description

The WMC function only generates a pdf plot (WMC_plot.pdf) to the Wavelet routine for multiple correlation (wave.multiple.correlation) from the wavemulcor package (Fernandez-Macho 2012), but also provides a way to handle multivariate time series easily as a list of N elements (time series).

Usage

WMC(inputDATA, Wname, J, Hpdf, Wpdf)

Arguments

inputDATA
A couple of time series as a ts object (please, check the ts manual to get more information about the ts function in R).
Wname
The wavelet function or filter to use in the decomposition.
J
Specifies the depth of the decomposition.
Hpdf
The height of the pdf file (output plot).
Wpdf
The width of the pdf file (output plot).

Value

  • Output:

    Output pdf file: WMC_plot.pdf.

    Output data: The same list of elements of the funtion wave.multiple.correlation of the wavemulcor package (Fernandez-Macho 2012).

encoding

latin1

Details

The WMC function helps to make easily the plot (in pdf format) of the multiple correlation routine (wave.multiple.correlation) of the wavemulcor package (Fernandez-Macho 2012). The WMC function also helps to manage easily multivariate time series to use the Wavelet multiple correlation routine.

References

Fernandez-Macho, J.. Wavelet multiple correlation and cross-correlation: A multiscale analysis of euro zone stock markets. Physica A: Statistical Mechanics and its Applications, 391(4):1097-1104, 2012. Fernandez-Macho, J. (2012). Wavemulcor Reference manual. The Comprehensive R Archive Network (CRAN), http://cran.r-project.org/web/packages/wavemulcor/index.html.

Examples

Run this code
library("wavemulcor")
 library("W2CWM2C")
 data(dataexample) 

 #:: Convert. log return using: ln(t + deltat) - ln(t) 
 #:: The application in this example is with stock market 
 #:: indexes and it is common to use log returns instead 
 #:: raw data. Other kinds of pre-processing data are possible. 

 dataexample  <- dataexample[-1] #remove the dates!
 dataexample  <- dataexample[,1:5]
 lrdatex      <- apply(log(dataexample), 2, diff)
 tslrdat      <- ts(lrdatex, start=1, frequency=1)

 #Input parameters 
  Wname       <- "la8"
  J           <- 8
  Hp          <- 6
  Wp          <- 10
  tslrdat     <- tslrdat[,1:5]
  compWMC     <- WMC(tslrdat, Wname, J, Hp, Wp)

Run the code above in your browser using DataLab