# SuanShu, a Java numerical and statistical library

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

## Class ARMAForecastOneStep

• java.lang.Object
• com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.arma.ARMAForecastOneStep

• public class ARMAForecastOneStep
extends Object
Computes the one-step ahead prediction of a causal ARMA model, by the innovative algorithm.
"P. J. Brockwell and R. A. Davis, "Section 5.3, Chapter 5, Recursive Prediction of an ARMA(p, q) Process," Time Series: Theory and Methods, Springer, 2006."
• ### Constructor Summary

Constructors
Constructor and Description
ARMAForecastOneStep(double[] xt, ARMAModel arma)
Makes the one-step ahead prediction for an ARMA model.
ARMAForecastOneStep(IntTimeTimeSeries xt, ARMAModel arma)
Makes the one-step ahead prediction for an ARMA model.
ARMAForecastOneStep(IntTimeTimeSeries xt, ARMAModel arma, InnovationsAlgorithm inn)
Makes the one-step ahead prediction for an ARMA model.
• ### Method Summary

All Methods
Modifier and Type Method and Description
static AutoCovarianceFunction K(ARMAModel arma)
double var()
Gets the mean squared error of the one-step ahead prediction.
double var(int n)
Gets the mean squared error of the prediction at time n for $$\hat{x}_{n+1}$$, i.e., $$E(x_{n+1} - \hat{x}_{n+1})^2$$.
double xHat()
Gets the one-step ahead prediction of the time series.
double xHat(int n)
Gets the one-step ahead prediction $$\hat{x}_{n+1}$$.
• ### Methods inherited from class java.lang.Object

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

• #### ARMAForecastOneStep

public ARMAForecastOneStep(IntTimeTimeSeries xt,
ARMAModel arma,
InnovationsAlgorithm inn)
Makes the one-step ahead prediction for an ARMA model.
Parameters:
xt - the observations
arma - the ARMA model
inn - the innovation algorithm to use
• #### ARMAForecastOneStep

public ARMAForecastOneStep(IntTimeTimeSeries xt,
ARMAModel arma)
Makes the one-step ahead prediction for an ARMA model.
Parameters:
xt - the observations
arma - the ARMA model
• #### ARMAForecastOneStep

public ARMAForecastOneStep(double[] xt,
ARMAModel arma)
Makes the one-step ahead prediction for an ARMA model.
Parameters:
xt - the observations
arma - the ARMA model
• ### Method Detail

• #### K

public static AutoCovarianceFunction K(ARMAModel arma)
• #### xHat

public double xHat(int n)
Gets the one-step ahead prediction $$\hat{x}_{n+1}$$.
Parameters:
n - time, ranging from 0 to T, the end of observation time
Returns:
the one-step prediction $$\hat{x}_{n+1}$$
"eq. 5.3.9"
• #### var

public double var(int n)
Gets the mean squared error of the prediction 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)
• #### xHat

public double xHat()
Gets the one-step ahead prediction of the time series.
Returns:
public double var()