dataFrame.columns.stat — sumSquaresTotal()

Description

The sumSquaresTotal() method of the stat object computes the total sum of squares (SST) for the selected columns.

Signature

dataFrame.columns(...columnNames).stat.sumSquaresTotal()
Scope
columns
Family
stat
Returns
number

Argument

...columnNames ( string[] )
The name of the columns from which to compute the total sum of squares.

Returns

ssw (number)
The computed total sum of squares.

Notes

  • The method requires at least two selected columns.
  • The statistic measures the total variability of all observations around the grand mean.
  • The total sum of squares combines both between-group and within-group variability.
  • The statistic is commonly used in analysis of variance (ANOVA).
  • The total sum of squares satisfies:
    sumSquaresTotal = sumSquaresBetween + sumSquaresWithin
  • The statistic is used in the computation of effect size measures such as eta squared and omega squared.

Example

// calculate the SST from the values of 2 columns of the dataFrame
var sst = dataFrame.columns('group_1', 'group_2').stat.sumSquaresTotal();

// log the SST
notebook.log(sst);