Learn R Programming

KFAS (version 0.9.9)

arimaSSM: Create a State Space Representation of ARIMA Model

Description

Function arimaSSM creates a state space representation of ARIMA model.

Usage

arimaSSM(y, arima, H = NULL, Q = NULL, u = NULL,
    distribution = c("Gaussian", "Poisson", "Binomial"),
    transform = c("none", "ldl", "augment"),
    tolF = .Machine$double.eps^0.5,
    tol0 = .Machine$double.eps^0.5)

Arguments

arima
A list or a list of lists with components ar, ma and d, giving the autoregression and moving average coefficients, and the degree of differencing for each series. If arima is a single list, it is assumed tha
H
A $p \times p$ covariance matrix (or $p \times p \times n$ array in of time-varying case) of the disturbance terms $\epsilon_t$ of the observation equation. Default gives $p \times p$ zero matrix ie. ordinary ARIMA model without additional noise
Q
A $p \times p$ covariance matrix of the disturbance terms $\eta_t$ of the system equation. Default is $p \times p$ identity matrix ie. ordinary ARIMA model with disturbance terms having unit variance.
y
A time series object of class ts, or a object that can be coerced to such.
u
Only used with non-Gaussian distribution. See details.
distribution
Specify the distribution of the observations. Default is "Gaussian".
transform
The functions of KFAS require diagonal covariance matrix $H_t$. If $H_t$ is not diagonal, model can be transformed using one of the two options. Option "ldl" performs LDL decomposition for covariance matrix $H_t$, and m
tolF
Tolerance parameter for Finf. Smallest value not counted for zero.
tol0
Tolerance parameter for LDL decomposition, determines which diagonal values are counted as zero.

Details

The linear Gaussian state space model is given by

$$y_t = Z_t \alpha_t + \epsilon_t,$$

$$\alpha_{t+1} = T_t \alpha_t + R_t \eta_t,$$

where $\epsilon_t ~ N(0,H_t)$, $\eta_t ~ N(0,Q_t)$ and $\alpha_1 ~ N(a_1,P_1)$ independently of each other. In case of non-Gaussian observations, the observation equation is of form $p(y_t|\theta_t) = p(y_t|Z_t\alpha_t)$, with $p(y_t|\theta_t)$ being one of the following:

If observations are Poisson distributed, parameter of Poisson distribution is $u_t\lambda_t$ and $\theta_t = log(\lambda_t)$.

If observations are from binomial distribution, $u$ is a vector specifying number the of trials at times $1,\ldots,n$, and $\theta_t = log[\pi_t/(1-\pi_t)]$, where $\pi_t$ is the probability of success at time $t$.

For non-Gaussian models $u_t=1$ as a default. For Gaussian models, parameter is omitted.

Only univariate observations are supported when observation equation is non-Gaussian.

See Also

regSSM for state space representation of a regression model, structSSM for structural time series model, and SSModel for custom SSModel object.