SuanShu, a Java numerical and statistical library

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

java.lang.Object
  extended by com.numericalmethod.suanshu.stats.timeseries.linear.univariate.stationaryprocess.MADecomposition

public class MADecomposition
extends java.lang.Object

This class decomposes a time series into the trend, seasonal and the stationary random components using the Moving Average Estimation with symmetric window.

That is,

 Xt = mt + st + Yt
 
We have

The R equivalent function is decompose.

See Also:
"P. J. Brockwell and R. A. Davis, "p. 23. Chapter 1.4. Elimination of both Trend and Seasonality," in Time Series: Theory and Methods, 2nd ed. Springer, 2006."

Field Summary
 TimeSeries random
          the stationary random component of the time series after the trend and seasonal components are removed
 TimeSeries seasonal
          the estimated seasonal effect of the time series
 TimeSeries trend
          the estimated trend of the time series
 
Constructor Summary
MADecomposition(TimeSeries Xt, double[] MAFilter, int period)
          Decompose a time series into the trend, seasonal and the stationary random components using the Moving Average Estimation.
MADecomposition(TimeSeries Xt, int period)
          Decompose a periodic time series into the seasonal and stationary random components using no MA filter.
MADecomposition(TimeSeries Xt, int MAOrder, int period)
          Decompose a time series into the trend, seasonal and the stationary random components using the default filter.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

trend

public final TimeSeries trend
the estimated trend of the time series


seasonal

public final TimeSeries seasonal
the estimated seasonal effect of the time series


random

public final TimeSeries random
the stationary random component of the time series after the trend and seasonal components are removed

Constructor Detail

MADecomposition

public MADecomposition(TimeSeries Xt,
                       double[] MAFilter,
                       int period)
Decompose a time series into the trend, seasonal and the stationary random components using the Moving Average Estimation.

Parameters:
Xt - a time series
MAFilter - the moving average filter to smooth the time series
period - the period of the time series; if aperiodic, use 1

MADecomposition

public MADecomposition(TimeSeries Xt,
                       int period)
Decompose a periodic time series into the seasonal and stationary random components using no MA filter.

Parameters:
Xt - a time series
period - the period of the time series; if aperiodic, use 0

MADecomposition

public MADecomposition(TimeSeries Xt,
                       int MAOrder,
                       int period)
Decompose a time series into the trend, seasonal and the stationary random components using the default filter.

Parameters:
Xt - a time series
MAOrder - the length of the MA filter (automatically increased by 1 for even MAOrder)
period - the period of the time series; if aperiodic, use 0
See Also:
"P. J. Brockwell and R. A. Davis, "Eq. 1.4.16. Chapter 1.4. Elimination of both Trend and Seasonality," in Time Series: Theory and Methods, 2nd ed. Springer, 2006."

SuanShu, a Java numerical and statistical library

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