compare.models: Graphically Compare GMWM Models Constructed by the Same Data

Description Usage Arguments Details Author(s) Examples

Description

Creates a table of graphs to compare GMWM model fits.

Usage

1
2
3
4
5
6
7
8
compare.models(..., display.model = T, background = "white",
  transparence = 0.1, CI.color = "#003C7D", line.color = NULL,
  line.type = NULL, point.size = NULL, point.shape = NULL,
  title = "Comparison of GMWM Models", title.size = 18,
  axis.label.size = 16, axis.tick.size = 11, facet.label.size = 13,
  facet.label.background = "#003C7D33",
  axis.x.label = expression(paste("Scale ", tau)),
  axis.y.label = expression(paste("Wavelet Variance ", nu)))

Arguments

...

Several gmwm objects, and they must be constrcuted by the same data.

display.model

A boolean indicating whether the model should be displayed in the facet label.

background

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

transparence

A double that ranges from 0 to 1 that controls the transparency of confidence interval.

CI.color

A string that indicates the color of the confidence interval (e.g. 'black', 'red', '#003C7D', etc.)

line.color

A vector of string that indicates the color of lines.

line.type

A vector of string that indicates the type of lines.

point.size

A vector of integer that indicates the size of points on lines.

point.shape

A vector of integer that indicates the shape of points on lines.

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.

facet.label.size

An integer that indicates the size of facet label.

facet.label.background

A string that indicates the background color of the facet label.

axis.x.label

A string that indicates the label on x axis.

axis.y.label

A string that indicates the label on y axis.

Details

This function only works for gmwm objects which are constrcuted by same data, and all gmwm objects must be constructed by classical method, or by robust methods with the same efficiency. That's because this function assumes each gmwm object has the same empirical wavelet variance (WV). This function will check whether this requirement is satisfied before plotting the graph.

The value of line.type, line.color, point.size, point.size must be a vector. Please follow this order: "Empirical WV, lower bound of CI, higher bound of CI, model1 implied WV, model2 implied WV, ...."

Please check examples for help.

If you meet the error "polygon edge not found", it is complaining that you don't have enough space to plot the graph. Adjust the plot window.

Author(s)

Wenchao

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
if(!require("imudata")){
   install_imudata()
   library("imudata")
}

data(imu6)

model1 = gmwm.imu(3*AR1(),imu6[,2])
model2 = gmwm.imu(2*AR1() + RW(),imu6[,2])
compare.models(model1, model2)
compare.models(model1, model2, display.model = F, point.size = c(4, 0, 0, 4, 4))
compare.models(model1, model2, transparence = 0.2, 
               line.color = c('black', 'grey', 'grey', 'blue', 'red'))

## End(Not run)

gmwm documentation built on April 14, 2017, 4:38 p.m.