Combine mutliple objects of persephone objects into a new persephone object. On the resulting objects seasonal adjustment can be performed to all elements at once

Super class

persephone::persephone -> multipleTimeSeries

Public fields

components

the series of the multiple time series

Active bindings

adjusted

results from the seasonal adjustment

params

of all components

forecasts

get forecasts

Methods

Inherited methods


Method new()

create a new multiple time series object

Usage

multipleTimeSeries$new(..., list = NULL)

Arguments

...

one or more objects which are either of class persephone or can be coerced to persephone objects with asPersephone. If more than one element is supplied, the underlying time series must have the same time instances. All elements supplied in ... must be named.

list

a list of persephone objects as alternative input to .... This argument can also handle mts objects


Method run()

run the model

Usage

multipleTimeSeries$run(verbose = FALSE)

Arguments

verbose

if FALSE (the default), the results of the run will be returned invisibly

Examples

perX13(AirPassengers)$run()


Method print()

print mutliple timeseries to screen

Usage

multipleTimeSeries$print()


Method setOptions()

sets options for all entries of the dependency tree recursively (if recursive = TRUE). See vignette("persephone-hierarchical") for more details.

Usage

multipleTimeSeries$setOptions(userdefined = NA, spec = NA, component = "")

Arguments

userdefined

additional outputs to generate while running. See x13() and tramoseats().

spec

specifications generated by x13_spec() or tramoseats_spec()

component

which component to modify.


Method iterate()

iterate over all components

Usage

multipleTimeSeries$iterate(
  fun,
  asTable = FALSE,
  component = "",
  unnest = FALSE
)

Arguments

fun

a function that takes a persephone object as a parameter

asTable

if true, the return value of this method will be coerced to a data.frame

component

the id of the component

unnest

if asTable = FALSE, converts the return value from a nested list into a flat list

Details

this functin is similar to lapply() in the sense that it can be used to apply a function to several persephone objects simultaniusely


Method updateParams()

change all or some parameters of components

Usage

multipleTimeSeries$updateParams(component = NULL, ...)

Arguments

component

character vector with names of the components for which the parameters should be changed. If NULL (default) the parameters of all components will be changed

...

named arguments to be changed

Details

this functions provides the possibility to update parameters of one or more persephone single objects


Method getComponent()

extract a component series

Usage

multipleTimeSeries$getComponent(componentId)

Arguments

componentId

the id of a component


Method generateQrTable()

Generate a table for the eurostat quality report

Usage

multipleTimeSeries$generateQrTable(component = "", ...)

Arguments

component

(optional) a sub-component to create the report for

...

additional arguments for the generate qr table function


Method fixModel()

fix the arima model(s)

Usage

multipleTimeSeries$fixModel(component = NULL, verbose = FALSE)

Arguments

component

character vector with names of the components for which the parameters should be changed. If NULL (default) the parameters of all components will be changed

verbose

if TRUE the changed parameters will be reported


Method fixOutlier()

fix the automatically detected outliers

Usage

multipleTimeSeries$fixOutlier(component = NULL, timespan = 12, verbose = FALSE)

Arguments

component

character vector with names of the components for which the parameters should be changed. If NULL (default) the parameters of all components will be changed

timespan

number of months from the end of the time series where outliers are not fixed

verbose

if TRUE the changed parameters will be reported


Method clone()

The objects of this class are cloneable with this method.

Usage

multipleTimeSeries$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) {
objX13 <- perX13(AirPassengers, "RSA3")

bt <- perBatch(a = objX13, b = objX13)
bt$run()

bt$adjusted

bt$updateParams(easter.enabled = FALSE)

bt$updateParams(component = "a", usrdef.outliersEnabled = TRUE,
                     usrdef.outliersType = c("AO","LS","LS"),
                     usrdef.outliersDate=c("1950-01-01","1955-04-01","1959-10-01"))

bt$fixModel()
}


## ------------------------------------------------
## Method `multipleTimeSeries$run`
## ------------------------------------------------

perX13(AirPassengers)$run()