Package dev.nm.stat.dlm.univariate
Class DLMSim
- java.lang.Object
-
- dev.nm.stat.dlm.univariate.DLMSim
-
public class DLMSim extends Object
This is a simulator for a univariate controlled dynamic linear model process. For (t ≥ 1), a controlled DLM takes the following form: Observation Equation:yt = Ft * xt + vt,
State Equation:xt = Gt * xt-1 + Ht * ut + wt,
Given the model parameters, the time series of control variables {ut} and an integer (length) T, This simulator generates both the states {xt} and observations {yt}.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DLMSim.Innovation
a simulated innovation
-
Constructor Summary
Constructors Constructor Description DLMSim(DLM model, RandomStandardNormalGenerator rnorm)
Simulate a univariate controlled dynamic linear model process.
-
-
-
Constructor Detail
-
DLMSim
public DLMSim(DLM model, RandomStandardNormalGenerator rnorm)
Simulate a univariate controlled dynamic linear model process.- Parameters:
model
- a univariate controlled dynamic linear modelrnorm
- a standard Gaussian random number generator (for seeding)
-
-
Method Detail
-
next
public DLMSim.Innovation next(double u)
Get the next innovation.- Parameters:
u
- the control as of time t - 1; used not for the first innovation (initial state)- Returns:
- a simulated innovation
-
-