Title: | The Non-Parametric Scott-Knott Effect Size Difference (ESD) Test |
---|---|
Description: | The Non-Parametric Scott-Knott Effect Size Difference (ESD) test is a mean comparison approach that leverages a hierarchical clustering to partition the set of treatment means (e.g., means of variable importance scores, means of model performance) into statistically distinct groups with non-negligible difference [Tantithamthavorn et al., (2018) <doi:10.1109/TSE.2018.2794977>]. |
Authors: | Chakkrit Tantithamthavorn |
Maintainer: | Chakkrit Tantithamthavorn <[email protected]> |
License: | GPL (>= 2) + file LICENSE |
Version: | 3.0.0 |
Built: | 2024-11-19 03:55:41 UTC |
Source: | https://github.com/klainfo/scottknottesd |
The Scott-Knott Effect Size Difference (ESD) test is a mean comparison approach that leverages a hierarchical clustering to partition the set of treatment means (e.g., means of variable importance scores, means of model performance) into statistically distinct groups with non-negligible difference [Tantithamthavorn et al., (2018) <doi:10.1109/TSE.2018.2794977>]. It is an alternative approach of the Scott-Knott test that considers the magnitude of the difference (i.e., effect size) of treatment means with-in a group and between groups. Therefore, the Scott-Knott ESD test (v2.x) produces the ranking of treatment means while ensuring that (1) the magnitude of the difference for all of the treatments in each group is negligible; and (2) the magnitude of the difference of treatments between groups is non-negligible.
The mechanism of the Scott-Knott ESD test (v2.x) is made up of 2 steps:
(Step 1) Find a partition that maximizes treatment means between groups. We begin by sorting the treatment means. Then, following the original Scott-Knott test, we compute the sum of squares between groups (i.e., a dispersion measure of data points) to identify a partition that maximizes treatment means between groups.
(Step 2) Splitting into two groups or merging into one group. Instead of using a likelihood ratio test and a Chi-square distribution as a splitting and merging criterion (i.e., a hypothesis testing of the equality of all treatment means), we analyze the magnitude of the difference for each pair for all of the treatment means of the two groups. If there is any one pair of treatment means of two groups are non-negligible, we split into two groups. Otherwise, we merge into one group. We use the Cohen effect size — an effect size estimate based on the difference between the two means divided by the standard deviation of the two treatment means (d = (mean(x_1) - mean(x_2))/s.d.).
Unlike the earlier version of the Scott-Knott ESD test (v1.x) that post-processes the groups that are produced by the Scott-Knott test, the Scott-Knott ESD test (v2.x) pre-processes the groups by merging pairs of statistically distinct groups that have a negligible difference.
Package: | ScottKnottESD |
Type: | Package |
Version: | 2.0.3 |
Date: | 2017-07-03 |
License: | GPL (>= 2) |
Chakkrit (Kla) Tantithamthavorn
Maintainer: Chakkrit (Kla) Tantithamthavorn <[email protected]>
Chakkrit Tantithamthavorn, Shane McIntosh, Ahmed E. Hassan, Kenichi Matsumoto, An Empirical Comparison of Model Validation Techniques for Defect Prediction Models. IEEE Transactions on Software Engineering. 43(1): 1-18 (2017). <doi:10.1109/TSE.2016.2584050>
Chakkrit Tantithamthavorn, Shane McIntosh, Ahmed E. Hassan, Kenichi Matsumoto, The Impact of Automated Parameter Optimization for Defect Prediction Models. IEEE Transactions on Software Engineering. Early Access. (2018). <doi:10.1109/TSE.2018.2794977>
-
library(ScottKnottESD) sk <- sk_esd(example) plot(sk) sk <- sk_esd(maven) plot(sk)
library(ScottKnottESD) sk <- sk_esd(example) plot(sk) sk <- sk_esd(maven) plot(sk)
Check the normality assumption of the input dataset using the Kolmogorov-Smirnov Test and the homogeneity of variances assumption of the input dataset using the Levene's test.
check.ANOVA.assumptions(x, alpha = 0.05, ...)
check.ANOVA.assumptions(x, alpha = 0.05, ...)
x |
A wide-format data frame. |
alpha |
The significance level. |
... |
Optional parameters. |
A wide-format data frame.
Chakkrit Tantithamthavorn ([email protected])
check.ANOVA.assumptions(example)
check.ANOVA.assumptions(example)
Convert data from long format to wide format
long2wide(x, ...)
long2wide(x, ...)
x |
A long-format data frame. |
... |
Optional parameters. |
A wide-format data frame.
Chakkrit Tantithamthavorn ([email protected])
long2wide(melt(example, id.vars=0))
long2wide(melt(example, id.vars=0))
Normalize non-normal distributions using the Box-Cox Power Transformation
normalize(x, ...)
normalize(x, ...)
x |
A wide-format data frame. |
... |
Optional parameters. |
A wide-format data frame.
Chakkrit Tantithamthavorn ([email protected])
normalized.data <- normalize(example)
normalized.data <- normalize(example)
A dataset containing software metrics of 1,000 calculation of Breiman's variable importance scores
example
example
A data frame with 1,000 rows and 9 variables:
lines of code
the numbers of components
the numbers of subsystems
the numbers of files
the numbers of commits
the numbers of churns
ownership
authorship
developer's experience
...
https://github.com/klainfo/ScottKnottESD/
A dataset containing software metrics of 1,000 calculation of Breiman's variable importance scores
maven
maven
A data frame with 1,000 rows and 27 variables:
An average physical lines of clone siblings of a clone.
An average comment lines in the methods that contain clone siblings of a clone.
McCabe Cyclomatic complexity of the method that contains the clone.
Number of commits that impact the method containing the clone.
Number of lines added into the method that contains the clone.
Number of source code lines in the method that contains the clone.
Maximum nesting level of control constructs in the method that contains the clone.
Number of commits that introduce new feature and that impact the method containing the clone.
Ratio of CommentLineCount to LineCodeCount.
Ratio of LineCount to CloneLineCount.
Number of tokens in the clone.
Type of clone class to which the clone belongs.
Number of physical lines in the clone.
Number of comment lines in the method that contains the clone.
McCabe Cyclomatic complexity of the method that contains the clone.
Number of distinct developers who modified the method that contains the clone.
Numberical measure of structuredness of the method that contains the clone.
Number of unique methods that call the method containg the clone.
Number of unique methods that are called by the method containing the clone.
Number of commits with a description of fixing bugs and that impact the method containing the clone.
Number of declarative source code lines in the method that contains the clone.
Number of lines in the method that contains the clone.
Number of lines deleted from the method that contains the clone.
Number of commits that introduce new feature and that impact the method containing the clone.
Number of tokens in the clone.
Number of directories that are traversed from the method containing one sibling to the method containing another sibling of the clone.
Number of clone siblings in the clone.
https://github.com/klainfo/ScottKnottESD/
S3 method to print sk_esd objects.
## S3 method for class 'sk_esd' print(x, ...)
## S3 method for class 'sk_esd' print(x, ...)
x |
A sk_esd object |
... |
Optional parameters. |
The sk.esd ranks
A function to check the magnitude of the difference for all pairs of treatments
An enhancement of the Scott-Knott test (which cluster distributions into statistically distinct ranks) that takes effect size into consideration.
checkDifference(ranking, data) sk_esd(x, version = "np", alpha = 0.05, ...)
checkDifference(ranking, data) sk_esd(x, version = "np", alpha = 0.05, ...)
ranking |
A ranking that is produced by the Scott-Knott ESD test |
data |
a data frame of treatment means |
x |
A wide-format data frame. |
version |
The version of scott-knott test. "np" = non-parametric, "p" = parametric, "o" = original |
alpha |
The significance level. |
... |
Optional parameters. |
A result of the magnitude of the difference for all pairs of treatments.
A sk_esd object.
Chakkrit Tantithamthavorn ([email protected])
sk <- sk_esd(example) checkDifference(sk$groups, example) sk <- sk_esd(example) plot(sk) sk <- sk_esd(maven) plot(sk)
sk <- sk_esd(example) checkDifference(sk$groups, example) sk <- sk_esd(example) plot(sk) sk <- sk_esd(maven) plot(sk)