Impact | R Documentation |
Calculates the Impact effect size measure that is based on the group distance and the difference in the shape of the data distribution between two groups.
Impact(Data, Cls, PlotIt = FALSE, pde = TRUE,
col = c("red","blue"), meanLines = FALSE, medianLines = FALSE, ...)
Data |
Numeric vector containing the values of both groups. |
Cls |
Grouping vector or factor of same length as Data, containing exactly two distinct classes. |
PlotIt |
Logical; if TRUE, plots the probability density function (PDF) of the two groups using Pareto density estimation or kernel density as fallback. |
pde |
Logical; if TRUE, attempts Pareto Density Estimation (PDE) for the PDFs in the plot. Ignored if |
col |
Character vector of length two specifying colors for the two groups in the plot. Ignored if |
meanLines |
Logical; if TRUE, draws vertical lines at group means in the plot. Ignored if |
medianLines |
Logical; if TRUE, draws vertical lines at group medians in the plot. Ignored if |
... |
Further graphical parameters passed to the plotting function if |
The Impact effect size measure combines central tendency differences (based on group medians) and morphological differences (based on Pareto density estimation). If Pareto density estimation fails or is disabled, the density plots fallback to standard kernel density estimates. The function can optionally plot these densities along with mean and/or median reference lines.
Returns a list with the following components:
Numeric scalar; the combined effect size measure based on difference in medians and distribution shapes.
Numeric scalar; the extent of difference in shapes of the probability density functions.
Numeric scalar; the extent of difference in group medians.
Data frame with columns PDEKernels
, pde_Cls1
, pde_Cls2
containing the density kernel points and Pareto densities for each group. This may be empty if Pareto density estimation was not successful or disabled.
Jorn Lotsch and Alfred Ultsch
Lotsch, J., and Ultsch, A. (2019): ImpactEffectsize – an R Package for calculation and visualisation of the Impact distance and shape based effect size measure.
## Example 1: Use Impact with plotting
data("FeatureselectionData")
ImpactSize <- Impact(Data = FeatureselectionData$Var0011,
Cls = FeatureselectionData$Classes, PlotIt = TRUE)
## Example 2: Impact without plotting
ImpactSize <- Impact(Data = FeatureselectionData$Var0011,
Cls = FeatureselectionData$Classes, PlotIt = FALSE)
## example 2
data("BcellLymphomaCD79")
data("FeatureselectionData")
data("FlowcytometricData")
data("SameMeansData")
data("StocksFluctuation")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.