hanaml.SeasonalDecompose.Rdhanaml.SeasonalDecompose is a R wrapper for SAP HANA PAL seasonality test.
hanaml.SeasonalDecompose( data, key = NULL, endog = NULL, alpha = NULL, thread.ratio = NULL, extrapolation = NULL, smooth.width = NULL, auxiliary.normalitytest = NULL )
| data |
|
|---|---|
| key |
|
| endog |
|
| alpha |
|
| thread.ratio |
|
| extrapolation |
|
| smooth.width |
|
| auxiliary.normalitytest |
|
Returns a list of DataFrame:
DataFrame 1
Statistics for time series, structured as follows:
STAT_NAME: includes type (additive or multiplicative), period (number of seasonality),
acf (autocorrelation coefficient).
STAT_VALUE:value of stats above.
DataFrame 2
Seasonal decomposition table, structured as follows::
ID: index/time stamp..
SEASONAL: seasonality component.
TREND: trend component.
RANDOM: white noise component.
Input DataFrame data:
> data$Collect() TIMESTAMP Y 1 1 10 2 2 7 3 3 17 4 4 34 5 5 9 ...... 31 31 83 32 32 55 33 33 207 34 34 25 35 35 0 36 36 0
Invoke the function:
> sd <- hanaml.SeasonalDecompose(data,
thread.ratio = 0.5,
alpha = 0.2)
Output:
> sd[[1]]$Collect() STAT_NAME STAT_VALUE 1 type multiplicative 2 period 4 3 acf 0.501947 > sd[[2]]$Collect() TIMESTAMP SEASONAL TREND RANDOM 1 1 1.2526605 10.125 0.7884453 2 2 0.3499516 14.000 1.4287688 3 3 0.7488509 16.875 1.3452711 4 4 1.6485370 16.750 1.2313043 ...... 33 33 1.2526605 82.125 2.0121557 34 34 0.3499516 64.875 1.1011706 35 35 0.7488509 32.125 0.0000000 36 36 1.6485370 3.125 0.0000000