hanaml.Wilcoxon.Rd
hanaml.Wilcoxon is a R wrapper for SAP HANA PAL Wilcox Signed Rank Test.
hanaml.Wilcoxon(
data,
col = NULL,
mu = NULL,
test.type = NULL,
correction = NULL
)
DataFrame
DataFrame containting the data.
character, optional
Name of the data column that needs to be tested.
If not given, the input dataframe must only have one column.
Defaults to NULL.
double, optional
Specifies the hypothetical value of median.
Defalut to 0.
{"two.sides", "less","greater"},optional
Specifies the type of the hypothesis for the test. The types are
given as follows:
"two.sides"
:The true median is different from mu.
"less"
:The true median is less than mu.
"greater"
:The true median is greater than mu.
Defaults to 'two.sides'.
logical, optional
Specifies whether or not to include the continuity correction
for the p value calculation.
Defaults to TRUE.
DataFrame
Statistical information of the test,e.g. p-value
STAT_NAME : Statistics name.
STAT_VALUE : Statistics value.
Wilcoxon signed rank test is a non-parametric procedure which tests the sample median against a hypothetical median. The Wilcoxon signed rank test should be used if the sample data come from a symmetrical distribution, otherwise it is recommended to use the one-sample-median test.
Input DataFrame data of one-sample example:
> data$Head(5)$Collect()
X
1 85
2 65
3 20
4 56
5 30
Call the function:
> result <- hanaml.Wilcoxon(data = data, test.type = "two.sides",
mu = 40, correction = TRUE )
Results:
> result$Collect()
STAT_NAME STAT_VALUE
1 statistic 158.50000000
2 p-value 0.01122824
Input DataFrame data of paired two-sample example:
> data$Head(5)$Collect()
X1 X2
1 85 60
2 65 68
3 20 20
4 56 89
5 30 7
Call the function:
> result <- hanaml.Wilcoxon(data = data, test.type = 'two.sides' ,
correction = TRUE)
Results:
> result$Collect()
STAT_NAME STAT_VALUE
1 statistic 118.5000000
2 p-value 0.3546207