hanaml.TrendTest {hana.ml.r}R Documentation

Trend Test

Description

hanaml.TrendTest is a R wrapper for PAL Trend Test.

Usage

hanaml.TrendTest(conn.context,
                        data,
                        key = NULL,
                        endog = NULL,
                        method = NULL,
                        alpha = NULL)

Arguments

conn.context

ConnectionContext
The connection to the SAP HANA system.

data

DataFrame
DataFrame containing the data.

key

character, optional
The ID column.
Defaults to the first column.

endog

character, optional
The endogenous variable of the given time series in data.
Defaults to the first non-ID column.

method

character, optional
The method used to identify trend.

  • 'mk': Mann-Kendall test.

  • 'difference.sign': Difference-sign test.

Defaults to 'mk'.

alpha

double, optional
Significance value. The value range is (0, 0.5).
Defaults to 0.05.

Value

List of DataFrame:

Examples

## Not run: 
Input data:
> data$Collect()
  TIMESTAMP              Y
         1          1 1500
         2          2 1510
         3          3 1550
         4          4 1650
         5          5 1620
         6          6 1690
         7          7 1695
         8          8 1700
         9          9 1710
         10        10 1705
         11        11 1708
         12        12 1715

invoke the function:
> tt <- hanaml.TrendTest(conn,
                         data,
                         method="mk",
                         alpha = 0.05)

Output:
> tt[[1]]$Collect()
  STAT_NAME   STAT_VALUE
1     TREND 1.000000e+00
2         S 6.000000e+01
3   P-VALUE 5.214912e-05

> tt[[2]]$Collect()
TIMESTAMP DETRENDED_SERIES
1          2               10
2          3               40
3          4              100
4          5              -30
5          6               70
6          7                5
7          8                5
8          9               10
9         10               -5
10        11                3
11        12                7
 
## End(Not run)

[Package hana.ml.r version 1.0.8 Index]