fnRegSSM: 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
  fnRegSSM(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.

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.


spacedman/hospitr documentation built on May 30, 2019, 6:34 a.m.