WMC: Wavelet multiple correlation (multivariate case).

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/WMC.R

Description

The WMC function generates a plot to the wavelet routine for multiple correlation (wave.multiple.correlation) from the wavemulcor package (Fernandez-Macho 2012b). The WMC plot output can be displayed in the screen (by default) or can be saved as PNG, JPG, PDF or EPS. Furthermore, it also provides a way to handle multivariate time series easily as a list of N elements (time series).

Usage

1
2
WMC(inputDATA, Wname, J, device="screen", filename,
          Hfig, WFig, 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.

device

The type of the output device (by default the option is “screen”, and the other options are “jpg”, “png”, “eps” and “pdf”).

filename

The output filename.

Hfig

The height of the 'jpg' or 'png' image.

WFig

The width of the 'jpg' or 'png' image.

Hpdf

The height of the 'eps' or 'pdf'.

Wpdf

The width of the 'eps' or 'pdf'.

Details

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

Value

Output:

Output plot: screen or 'filename + .png, .jpg, .eps or .pdf'.

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

Note

Needs wavemulcor (to compute the wave.multiple.correlation) and waveslim packages (to compute the modwt and the brick.wall).

Author(s)

Josue M. Polanco-Martinez (a.k.a. jomopo)..
BC3 - Basque Centre for Climate Change, Bilbao, Spain.
Web1: https://scholar.google.es/citations?user=8djLIhcAAAAJ&hl=en.
Web2: http://www.researchgate.net/profile/Josue_Polanco-Martinez.
Email: [email protected]

References

Fernandez-Macho, J. (2012a). 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.

Fernandez-Macho, J. (2012b). wavemulcor: Wavelet routine for multiple correlation. R package version 1.2. The Comprehensive R Archive Network (CRAN),
http://cran.r-project.org/package=wavemulcor

Polanco-Martinez, J. and J. Fernandez-Macho (2014). The package 'W2CWM2C': description, features and applications. Computing in Science & Engineering, 16(6):68–78. DOI: 10.1109/MCSE.2014.96.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 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 of 
 #:: 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)
 inputDATA    <- ts(lrdatex, start=1, frequency=1)

 #Input parameters 
  Wname       <- "la8"
  J           <- 8
  compWMC     <- WMC(inputDATA, Wname, J, device="screen", NULL,
                     NULL, NULL, NULL, NULL)

W2CWM2C documentation built on May 29, 2017, 10:19 a.m.