SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.dlm
Class StateEquation

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.dlm.StateEquation

public class StateEquation
extends java.lang.Object

The state equation in a controlled dynamic linear model.

x_t = G_t * x_{t - 1} + H_t * u_t + w_t (State Equation),


Constructor Summary
StateEquation(Matrix G, Matrix W)
          Construct a time-invariant state equation without control variables.
StateEquation(Matrix G, Matrix H, Matrix W)
          Construct a time-invariant state equation.
StateEquation(R1toMatrix G, R1toMatrix W)
          Construct a state equation without control variables.
StateEquation(R1toMatrix G, R1toMatrix H, R1toMatrix W)
          Construct a state equation.
StateEquation(StateEquation that)
          Copy constructor.
 
Method Summary
 int dimension()
          Get the dimension of each state x_t.
 Matrix G(int t)
          Get G(t), the coefficient matrix of x_{t - 1}.
 Matrix H(int t)
          Get H(t), the covariance matrix of u_t.
 Matrix W(int t)
          Get W(t), the covariance matrix of w_t.
 Vector xt_mean(int t, Vector xt_1)
          Predict for the next state without control variable.
 Vector xt_mean(int t, Vector xt_1, Vector ut)
          Predict for the next state.
 Matrix xt_var(int t, Matrix var_tlag_tlag)
          Variance of the (a prior) prediction for the next state.
 Vector xt(int t, Vector xt_1)
          Compute the state equation without the control variable.
 Vector xt(int t, Vector xt_1, Vector ut)
          Compute the state equation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateEquation

public StateEquation(R1toMatrix G,
                     R1toMatrix H,
                     R1toMatrix W)
Construct a state equation.

Parameters:
G - the coefficient matrix function of x_{t - 1}
H - the coefficient matrix function of control variables {u_t}; may be null
W - the covariance matrix function of {w_t}

StateEquation

public StateEquation(R1toMatrix G,
                     R1toMatrix W)
Construct a state equation without control variables.

Parameters:
G - the coefficient matrix function of x_{t - 1}
W - the covariance matrix function of {w_t}

StateEquation

public StateEquation(Matrix G,
                     Matrix H,
                     Matrix W)
Construct a time-invariant state equation.

Parameters:
G - the coefficient matrix function of x_{t - 1}
H - the coefficient matrix function of control variables {u_t}; may be null
W - the covariance matrix function of {w_t}

StateEquation

public StateEquation(Matrix G,
                     Matrix W)
Construct a time-invariant state equation without control variables.

Parameters:
G - the coefficient matrix function of x_{t - 1}
W - the covariance matrix function of {w_t}

StateEquation

public StateEquation(StateEquation that)
Copy constructor.

Parameters:
that - another StateEquation
Method Detail

dimension

public int dimension()
Get the dimension of each state x_t.

Returns:
the dimension of states

G

public Matrix G(int t)
Get G(t), the coefficient matrix of x_{t - 1}.

Parameters:
t - time
Returns:
G(t)

H

public Matrix H(int t)
Get H(t), the covariance matrix of u_t.

Parameters:
t - time
Returns:
H(t)

W

public Matrix W(int t)
Get W(t), the covariance matrix of w_t.

Parameters:
t - time
Returns:
W(t)

xt_mean

public Vector xt_mean(int t,
                      Vector xt_1,
                      Vector ut)
Predict for the next state.
E(x_t) = G_t * x_{t - 1} + H_t * u_t

Parameters:
t - time
xt_1 - x lag x_{t - 1}
ut - control variable u_t
Returns:
x_t

xt_mean

public Vector xt_mean(int t,
                      Vector xt_1)
Predict for the next state without control variable.
E(x_t) = G_t * x_{t - 1} + H_t * u_t

Parameters:
t - time
xt_1 - x lag x_{t - 1}
Returns:
x_t

xt_var

public Matrix xt_var(int t,
                     Matrix var_tlag_tlag)
Variance of the (a prior) prediction for the next state.
Var(x_{t | t - 1}) = G_t * Var(x_{t - 1| t - 1}) * G_t' + W_t

Parameters:
t - time
var_tlag_tlag - Var(x_{t - 1 | t - 1}), the variance of the posterior update
Returns:
Var(x_{t | t - 1})

xt

public Vector xt(int t,
                 Vector xt_1,
                 Vector ut)
Compute the state equation.
x_t = G_t * x_{t - 1} + H_t * u_t + w_t

Parameters:
t - time
xt_1 - x lag x_{t - 1}
ut - control variable u_t
Returns:
x_t

xt

public Vector xt(int t,
                 Vector xt_1)
Compute the state equation without the control variable.
x_t = G_t * x_{t - 1} + H_t * u_t + w_t

Parameters:
t - time
xt_1 - x lag x_{t - 1}
Returns:
x_t

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.