compare_models | R Documentation |
Creates a table of graphs to compare GMWM model fit.
compare_models(..., display.model = T, show.theo.wv = F, facet.label = NULL, background = "white", transparence = 0.05, CI.color = NULL, 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)))
... |
Several |
display.model |
A |
show.theo.wv |
A |
facet.label |
A |
background |
A |
transparence |
A |
CI.color |
A |
line.color |
A |
line.type |
A |
point.size |
A |
point.shape |
A |
title |
A |
title.size |
An |
axis.label.size |
An |
axis.tick.size |
An |
facet.label.size |
An |
facet.label.background |
A |
axis.x.label |
A |
axis.y.label |
A |
This function has been updated to deal with any gmwm
object. The old contraint that supplied
objects must be constrcuted by the same data is no longer needed.
The parameter show.theo.wv
will be automatically set to TRUE, if the supplied gmwm
objects
are constructed by the same data. This aims to mimic the behaviour in the old version of compare_models
.
The default aesthetical setting is designed to work well with 2 and 3 objects. Users are expected to change the color/point/line settings if they want to supply more than 3 objects.
If two models have the same attribute values, for example, same empirical WV, then their aethetics will be set to the same, i.e. same line type, line color, point size, point shape, etc.
A ggplot2 panel containing the graphs of gmwm objects.
Wenchao
## Not run: #AR set.seed(8836) x1 = gen_gts(1000, AR1(phi = .1, sigma2 = 1) + AR1(phi = 0.95, sigma2 = .1)) x2 = gen_gts(2000, AR1(phi = .1, sigma2 = 1) + AR1(phi = 0.95, sigma2 = .1)) GMWM1 = gmwm(AR1(), data = x1) GMWM2 = gmwm(2*AR1(), data = x2) compare_models(GMWM1, GMWM2, show.theo.wv = T, transparence = 0.2, facet.label = c('model1', 'model2')) compare_models(GMWM1, GMWM2, CI.color = c('black','red'), point.size = c(3, 3, 0, 0, 0, 0, 2, 2), line.color = c('black', 'red', 'grey', 'pink', 'grey', 'pink', 'purple', 'green')) #in the order of emp. WV, lower bound, higher bound, theo. WV ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.