hanaml.OnewayAnovaRepeated.Rd
hanaml.OnewayAnovaRepeated is a R wrapper for SAP HANA PAL ANOVA.
hanaml.OnewayAnovaRepeated(
data,
subject.id = NULL,
measures = NULL,
multcomp.method = NULL,
significance.level = NULL,
se.type = NULL
)
DataFrame
DataFrame containting the data.
character, optional
Name of the subject ID column.
The algorithm treats each row of the data table as a different subject.
Hence there should be no duplicate subject ids in this column.
If not provided, it defaults to the first columns.
character, optional
Names of the groups (measures).
If not provided, defaults to all non subject.id columns.
character, optional
Method used to perform multiple comparison tests.
"tukey-kramer"
"bonferroni"
"dunn-sidak"
"scheffe"
"fisher-lsd"
Defaults to "bonferroni".
double, optional
The significance level when the function calculates the confidence
interval in multiple comparison tests.
Values must be greater than 0 and less than 1.
Defaults to 0.05.
character, optional
"all-data"
: computes the standard error from all data. It has
more power if the assumption of sphericity is TRUE, especially with small
data sets.
"two-group"
: computes the standard error from only the two groups
being compared. It does not assume sphericity.
Defaults to "two-group".
Returns a list of 4 DataFrame:DataFrame 1
Statistics for each group, structured as follows:
GROUP, type NVARCHAR(256), group name.
VALID_SAMPLES, type INTEGER, number of valid samples.
MEAN, type DOUBLE, group mean.
SD, type DOUBLE, group standard deviation.
DataFrame 2
Mauchly test results, structured as follows:
STAT_NAME, type NVARCHAR(100), names of test result quantities.
STAT_VALUE, type DOUBLE, values of test result quantities.
DataFrame 3
Computed results for ANOVA , structured as follows:
VARIABILITY_SOURCE, type NVARCHAR(100), source of variability, including between groups, within groups (error) and total.
SUM_OF_SQUARES, type DOUBLE, sum of squares.
DEGREES_OF_FREEDOM, type DOUBLE, degrees of freedom.
MEAN_SQUARES, type DOUBLE, mean squares.
F_RATIO, type DOUBLE, calculated as mean square between groups divided by mean square of error.
P_VALUE, type DOUBLE, associated p-value from the F-distribution.
P_VALUE_GG, type DOUBLE, p-value of Greehouse-Geisser correction.
P_VALUE_HF, type DOUBLE, p-value of Huynh-Feldt correction.
P_VALUE_LB, type DOUBLE, p-value of lower bound correction.
DataFrame 4
Multiple comparison results, structured as follows
FIRST_GROUP, type NVARCHAR(256), the name of the first group to conduct pairwise test on.
SECOND_GROUP, type NVARCHAR(256), the name of the second group to conduct pairwise test on.
MEAN_DIFFERENCE, type DOUBLE, mean difference between the two groups.
SE, type DOUBLE, standard error computed from all data.
P_VALUE, type DOUBLE, p-value.
CI_LOWER, type DOUBLE, the lower limit of the confidence interval.
CI_UPPER, type DOUBLE, the upper limit of the confidence interval.
Performs one-way repeated measures analysis of variance, along with Mauchly's Test of Sphericity and post hoc multiple comparison tests.
Input DataFrame data:
> data$Collect()
ID MEASURE1 MEASURE2 MEASURE3 MEASURE4
1 1 8.0 7.0 1.0 6.0
2 2 9.0 5.0 2.0 5.0
3 3 6.0 2.0 3.0 8.0
4 4 5.0 3.0 1.0 9.0
5 5 8.0 4.0 5.0 8.0
6 6 7.0 5.0 6.0 7.0
7 7 10.0 2.0 7.0 2.0
8 8 12.0 6.0 8.0 1.0
Call the function:
> result <- hanaml.OnewayAnovaRepeated(data,
multcomp.method = "bonferroni",
significance.level = 0.05,
se.type = "two-group")
Output:
> result[[1]]
GROUP VALid_SAMPLES MEAN SD
1 MEASURE1 8 8.125 2.232071
2 MEASURE2 8 4.250 1.832251
3 MEASURE3 8 4.125 2.748376
4 MEASURE4 8 5.750 2.915476