+.tsgarch.spec {tsgarch} | R Documentation |
Combine univariate GARCH specifications into a multi-specification object
Description
Combine univariate GARCH specifications into a multi-specification object
Usage
## S3 method for class 'tsgarch.spec'
x + y
Arguments
x |
an object of class “tsgarch.spec” |
y |
an object of class “tsgarch.spec” |
Details
A simple method for combining multiple specifications into an object which can then be estimated using parallel resources. Note that the returned object is effectively a validated list of specification objects with no names. Names can be assigned post-construction (see example).
Value
an object of class “tsgarch.multispec”
Examples
library(xts)
x <- xts(rnorm(1000), as.Date(1:1000, origin = "1970-01-01"))
y <- xts(rnorm(1000), as.Date(1:1000, origin = "1970-01-01"))
z <- xts(rnorm(1000), as.Date(1:1000, origin = "1970-01-01"))
mspec <- garch_modelspec(x, model = "egarch") +
garch_modelspec(y, model = "cgarch") +
garch_modelspec(z, model = "aparch")
names(mspec) <- c("x", "y", "z")
sapply(mspec, function(x) x$model$model)
[Package tsgarch version 1.0.3 Index]