dataFrame.columns.stat — anova()
Description
The anova() method of the stat object performs a one-way analysis of variance (ANOVA) on the selected columns.
Signature
dataFrame.columns(...columnNames).stat.anova({ mode: 'welch' })Arguments
...columnNames( string[] )- The name of the columns from which to compute ANOVA.
options(object)- ANOVA options.
Option
mode(string)- The ANOVA method to use.
fisherwelch(default)
Returns
stat( object[] )- A statistic object containing the ANOVA test results.
F_stat(number)- The F statistic.
p_value(number)- The p-value associated with the test.
eta_squared(number)- The proportion of variance explained by group membership.
omega_squared(number)- The estimated proportion of variance explained by group membership in the population.
df_between(number)- The between-groups degrees of freedom.
df_within(number)- The within-groups degrees of freedom.
Notes
- The
fishermode performs the classical one-way ANOVA assuming equal variances across groups. - The
welchmode performs Welch's ANOVA and does not assume equal variances across groups. - The null hypothesis states that all group means are equal.
etaSquared(η²) is an effect size measure representing the proportion of variance explained by the grouping variable.omegaSquared(ω²) is a less biased effect size measure that estimates the proportion of variance explained in the population.- Larger values of
etaSquaredandomegaSquaredindicate a stronger effect of group membership on the observed values.
Example
// test the values of 3 columns of the dataFrame
var stat = dataFrame.columns('groupA', 'groupB', 'groupC').stat.anova();
// log the stat details
notebook.log(stat);