SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess

Class InnovationsAlgorithm

• java.lang.Object
• com.numericalmethod.suanshu.stats.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.
This class implements the part of the innovations algorithm that computes the prediction error variances, v and prediction coefficients θ. The coefficients depend only on the auto-covariance function and time horizon, not on any particular time series data.
"P. J. Brockwell and R. A. Davis, "Proposition. 5.2.2, Chapter 5, Multivariate Time Series," Time Series: Theory and Methods, Springer, 2006."
• Constructor Summary

Constructors
Constructor and Description
InnovationsAlgorithm(int T, AutoCovarianceFunction K)
Constructs an instance of InnovationsAlgorithm for a univariate time series with known auto-covariance structure.
• Method Summary

All Methods
Modifier and Type Method and 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)
• Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• Constructor Detail

• InnovationsAlgorithm

public InnovationsAlgorithm(int T,
AutoCovarianceFunction K)
Constructs an instance of InnovationsAlgorithm for a univariate time series with known auto-covariance structure.
Parameters:
T - time series length
K - 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 T
j - 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)