Class InnovationsAlgorithm
- java.lang.Object
-
- dev.nm.stat.timeseries.linear.univariate.stationaryprocess.InnovationsAlgorithm
-
public class InnovationsAlgorithm extends Object
The innovations algorithm is an efficient way to obtain a one step least square linear predictor for a univariate linear time series with known auto-covariance and these properties (not limited to ARMA processes):- {xt} can be non-stationary.
- E(xt) = 0 for all t.
-
-
Constructor Summary
Constructors Constructor Description InnovationsAlgorithm(int T, AutoCovarianceFunction K)
Constructs an instance ofInnovationsAlgorithm
for a univariate time series with known auto-covariance structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
theta(int i, int j)
Gets the coefficients of the linear predictor.double
var(int n)
Gets the mean squared error for prediction errors at time n for \(\hat{x}_{n+1}\), i.e., \(E(x_{n+1} - \hat{x}_{n+1})^2\).InnovationsAlgorithm
withNewLength(int T)
-
-
-
Constructor Detail
-
InnovationsAlgorithm
public InnovationsAlgorithm(int T, AutoCovarianceFunction K)
Constructs an instance ofInnovationsAlgorithm
for a univariate time series with known auto-covariance structure.- Parameters:
T
- time series lengthK
- the auto-covariance function
-
-
Method Detail
-
withNewLength
public InnovationsAlgorithm withNewLength(int T)
-
theta
public double theta(int i, int j)
Gets the coefficients of the linear predictor.- Parameters:
i
-i
, ranging from 0 to Tj
-j
, ranging from 0 to T- Returns:
- θ[i][j]; θ[?][0] = 1
-
var
public double var(int n)
Gets the mean squared error for prediction errors at time n for \(\hat{x}_{n+1}\), i.e., \(E(x_{n+1} - \hat{x}_{n+1})^2\).- Parameters:
n
- time, ranging from 0 to T, the end of observation time- Returns:
- the mean squared error (variance)
-
-