regSSM: Create a State Space Model Representation of Linear...

Description Usage Arguments Details See Also

Description

Function regSSM creates a state space representation of linear regression model.

Usage

1
2
3
4
5
  regSSM(y, X, 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

X

A n*k matrix of explanatory variables, with each column containing one explanatory variable, or a list of length p containing X matrices for each series. If X is matrix, it is assumed that all p series use same explanatory variables.

H

A p*p covariance matrix (or p*p*n array in of time-varying case) of the disturbance terms epsilon[t] of the observation equation. Default gives p*p zero matrix. Omitted in case of non-Gaussian distributions. Augment the state vector if you want to add additional noise.

Q

A r*r (or r*r*n array in of time-varying case) covariance matrix of the disturbance terms η[t] of the system equation. Default is m*m zero matrix ie. ordinary time-invariant regression.

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 multiplies the observation equation with the L[t]^{-1}, so ε[t] ~ N(0,D[t]). Option "augment" adds ε[t] to the state vector, when Q[t] becomes block diagonal with blocks Q[t] and H[t]. In case of univariate series, option "ldl" only changes the H_type argument of the model to "Diagonal". Default is "none" which does no transformation but checks if H is diagonal. If not, H_type is set to "Untransformed".

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]α[t] + ε[t], (observation equation)

α[t+1] = T[t]α[t] + R[t]η[t], (transition equation)

where ε[t] ~ N(0,H[t]), η[t] ~ N(0,Q[t]) and α[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]|θ[t]) = p(y[t]|Z[t]α[t]), with p(y[t]|θ[t]) being one of the following:

See Also

arimaSSM for state space representation of ARIMA model, structSSM for structural time series model, and SSModel for custom SSModel object.


jrnold/KFAS documentation built on May 19, 2019, 11:55 p.m.