Class MADecomposition
- java.lang.Object
-
- dev.nm.stat.timeseries.linear.univariate.stationaryprocess.MADecomposition
-
public class MADecomposition extends Object
This class decomposes a time series into the trend, seasonal and stationary random components using the Moving Average Estimation method with symmetric window. That is,Xt = mt + st + Yt
We have- EYt = 0
- st+d = st
- Σ(sj) = 0
decompose
.
-
-
Constructor Summary
Constructors Constructor Description MADecomposition(double[] xt, double[] MAFilter, int period)
Decompose a time series into the trend, seasonal and stationary random components using the Moving Average Estimation method.MADecomposition(double[] xt, int period)
Decompose a periodic time series into the seasonal and stationary random components using no MA filter.MADecomposition(double[] xt, int MAOrder, int period)
Decompose a time series into the trend, seasonal and stationary random components using the default filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[]
getRandom()
Get the estimated seasonal effect of the time series.double[]
getSeasonal()
Get the stationary random component of the time series after the trend and seasonal components are removed.double[]
getTrend()
Get the estimated trend of the time series.
-
-
-
Constructor Detail
-
MADecomposition
public MADecomposition(double[] xt, double[] MAFilter, int period)
Decompose a time series into the trend, seasonal and stationary random components using the Moving Average Estimation method.- Parameters:
xt
- a time seriesMAFilter
- the moving average filter to smooth the time seriesperiod
- the period of the time series; if aperiodic, use 1
-
MADecomposition
public MADecomposition(double[] xt, int MAOrder, int period)
Decompose a time series into the trend, seasonal and stationary random components using the default filter.- Parameters:
xt
- a time seriesMAOrder
- the length of the MA filter (automatically increased by 1 for evenMAOrder
)period
- the period of the time series; if aperiodic, use 0
-
MADecomposition
public MADecomposition(double[] xt, int period)
Decompose a periodic time series into the seasonal and stationary random components using no MA filter.- Parameters:
xt
- a time seriesperiod
- the period of the time series; if aperiodic, use 0
-
-
Method Detail
-
getTrend
public double[] getTrend()
Get the estimated trend of the time series.- Returns:
- the estimated trend
-
getSeasonal
public double[] getSeasonal()
Get the stationary random component of the time series after the trend and seasonal components are removed.- Returns:
- the stationary random component
-
getRandom
public double[] getRandom()
Get the estimated seasonal effect of the time series.- Returns:
- the estimated seasonal effect
-
-