Compare Wavelet Variances

Share:

Description

Compare the estimates given by the classical and robust methods of calculating the wavelet variance.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
compare.wvar(..., background = "white", split = TRUE, CI = TRUE,
  auto.label.wvar = T, transparence = 0.1, line.color = NULL,
  CI.color = NULL, line.type = NULL, point.size = NULL,
  point.shape = NULL, title = "Haar Wavelet Variance Representation",
  title.size = 15, axis.label.size = 13, axis.tick.size = 11,
  axis.x.label = expression(paste("Scale ", tau)),
  axis.y.label = expression(paste("Wavelet Variance ", nu)),
  facet.label.size = 13, legend.label = NULL, legend.title = "",
  legend.key.size = 1.3, legend.title.size = 13, legend.text.size = 13,
  nrow = 1)

Arguments

...

Any number of wvar objects can be passed in.

background

A string that determines the graph background. It can be 'grey' or 'white'.

split

A boolean that indicates whether the graphs should be separate (TRUE) or graphed ontop of each other (FALSE)

CI

A boolean that indicates whether the confidence interval should be plotted.

auto.label.wvar

A boolean that indicates whether legend label should indicate the wvar objects are robust or classical

transparence

A double that ranges from 0 to 1 that controls the transparency of the graph

line.color

A vector of string that indicates the color of lines. If not NULL, length of vector must equal to the number of wvar objects that are passed in.

CI.color

A vector of string that indicates the color of confidence interval. If not NULL, length of vector must equal to the number of wvar objects that are passed in.

line.type

A vector of string that indicates the type of lines for wavelet variance and the edge of confidence interval, respectively. If not NULL, length of vector must equal to 2.

point.size

A vector of integer that indicates the size of point

point.shape

A vector of integer that indicates the shape of point

title

A string that indicates the title of the graph

title.size

An integer that indicates the size of title.

axis.label.size

An integer that indicates the size of label

axis.tick.size

An integer that indicates the size of tick mark

axis.x.label

A string that indicates the label on x axis

axis.y.label

A string that indicates the label on y axis

facet.label.size

An integer that indicates the size of facet label

legend.label

A vector of string that indicates the labels on legend. If not NULL, length of vector must equal to the number of wvar objects that are passed in.

legend.title

A string that indicates the title of legend

legend.key.size

A double that indicates the size of key (in centermeters) on legend

legend.title.size

An integer that indicates the size of title on legend

legend.text.size

An integer that indicates the size of key label on legend

nrow

An integer that indicates number of rows

Note

Common error "Error in grid.Call(L_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : polygon edge not found" Just run your code again or open R using the R GUI instead of RStudio.

Author(s)

JJB, Wenchao

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
## Not run: 
#1. Compare two objects
N1 = 1000
N2 = 2000
data.ar = gen.gts(AR1(phi = .32, sigma2=.01), N1)
data.arma = gen.gts(ARMA(ar=c(.8,.1), ma=c(.3), sigma2=1), N2)
wvar1 = wvar(data.ar)
wvar2 = wvar(data.arma, robust = T)
compare.wvar(wvar1, wvar2)
compare.wvar(wvar1, wvar2, split=F)
compare.wvar(wvar1, wvar2, CI = F)
compare.wvar(wvar1, wvar2, split=F, CI = F)
#2. Compare multiple objects
N1 = 1000
N2 = 2000
N3 = 4000
N4 = 3500
data1 = gen.gts(AR1(phi = .32, sigma2=.01), N1)
data2 = gen.gts(ARMA(ar=c(.8,.1), ma=c(.3), sigma2=1), N2)
data3 = gen.gts(AR1(phi = .32, sigma2=1), N3)
data4 = gen.gts(ARMA(ar=c(.8,.1), ma=c(.5), sigma2=1), N4)
wvar1 = wvar(data1)
#wvar1 = wvar(data1, robust = T)
wvar2 = wvar(data2)
wvar3 = wvar(data3)
wvar4 = wvar(data4)
compare.wvar(wvar1,wvar2,wvar3,wvar4, nrow = 2)
compare.wvar(wvar1,wvar2,wvar3,wvar4, split = F , CI = F)
#3. Change default setting
compare.wvar(wvar1, wvar2, wvar3,wvar4, CI.color = c('green','red','blue','black'))
compare.wvar(wvar1, wvar2, wvar3,wvar4, CI.color = c('green','red','blue','black'), 
facet.label.size = 9)
compare.wvar(wvar1, wvar2, wvar3,wvar4, CI.color = c('green','red','blue','black'), 
legend.label = c('1','2','3','4'))
compare.wvar(wvar1, wvar2, wvar3,wvar4, CI.color = c('green','red','blue','black'), 
legend.label = c('1','2','3','4'), split = F)
compare.wvar(wvar1, wvar2, wvar3,wvar4, CI.color = c('green','red','blue','black'), 
legend.label = c('1','2','3','4'), split = F, CI = F)

## End(Not run)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.