TFPmodel {RGAP}R Documentation

TFP trend model

Description

Creates a state space object object of class TFPmodel which can be fitted using fit.

Usage

TFPmodel(
  tsl,
  trend = "DT",
  cycle = "AR2",
  cycleLag = 0,
  cubsAR = 0,
  cubsErrorARMA = c(0, 0),
  start = NULL,
  end = NULL,
  anchor = NULL,
  anchor.h = NULL
)

Arguments

tsl

A list of time series objects, see details.

trend

A character string specifying the trend model. trend = "RW1" denotes a first order random walk, trend = "RW2" a second order random walk (local linear trend) and trend = "DT" a damped trend model. The default is trend = "DT".

cycle

A character string specifying the cycle model. cycle = "AR1" denotes an AR(1) process, cycle = "AR2" an AR(2) process, cycle = "RAR2" a reparametrized AR(2) process. The default is cycle = "AR2".

cycleLag

A non-negative integer specifying the maximum cycle lag that is included in the CUBD equation. The default is cycleLag = 0, see details.

cubsAR

A non-negative integer specifying the maximum CUBS lag that is included in the CUBS equation. The default is cubsAR = 0, see details.

cubsErrorARMA

A vector with non-negative integers specifying the AR and MA degree of the error term in the CUBS equation. The default is cubsErrorARMA = c(0, 0), see details.

start

(Optional) Start vector for the estimation, e.g. c(1980, 1).

end

(Optional) End vector for the estimation, e.g. c(2020, 1).

anchor

(Optional) Snchor value for the log of the TFP trend.

anchor.h

(Optional) Anchor horizon in the frequency of the given time series.

Details

The list of time series tsl needs to have the following components:

tfp

Total factor productivity.

cubs

Capacity utilization economic sentiment indicator.

A cycleLag equal to 0 implies that only the contemporaneous cycle is included in the CUBS equation. A cycleLag equal to 0:1 implies that the contemporaneous as well as the lagged cycle are included.

A cubsAR equal to 0 implies that no autoregressive term is included in the CUBS equation. cubsAR = 1 implies that a lagged term is included, cubsAR = 2 implies that a two lags are included, and so on.

A cubsErrorARMA equal to c(0, 0) implies that the error term in the CUBS equation is white noise. cubsErrorARMA = c(1, 0) implies that the error is an AR(1) process and for cubsErrorARMA = c(1, 2) the error follows an ARMA(1, 2) process.

Value

Object of class TFPmodel, which is a list with the following components:

tsl

A list of used time series.

SSModel

An object of class SSModel specifying the state-space model.

loc

A data frame containing information on each involved parameter, for instance its corresponding system matrix, variable names, and parameter restrictions.

call

Original call to the function.

In addition, the object contains the following attributes:

cycle

Cycle specification.

trend

Trend specification.

cubs

A list containing the components cycleLag, cubsAR, errorARMA, exoVariables.

anchor

A list containing the components value, horizon.

period

A list containing the components start, end, frequency.

Examples

# load data for Germany
data("gap")
data("indicator")
country <- "Germany"
tsList <- amecoData2input(gap[[country]], alpha = 0.65)

# compute cubs indicator
namesCubs <- c("indu", "serv", "buil")
namesVACubs <- paste0("va", namesCubs)
tscubs <- cubs(
  tsCU = gap[[country]][, namesCubs],
  tsVA = gap[[country]][, namesVACubs]
)
tsList <- c(tsList, tscubs)

# define tfp model
model <- TFPmodel(tsl = tsList, cycle = "RAR2", cubsErrorARMA = c(1,0))

[Package RGAP version 0.1.1 Index]