dataFrame.column.stat — autoCorrDurbinWatson()

Description

The autoCorrDurbinWatson() method of the stat object measures the presence of autocorrelation in the values of the selected column using the Durbin–Watson statistic.

Signature

dataFrame.column(columnName).stat.autoCorrDurbinWatson()
Scope
column
Family
stat
Returns
number

Argument

columnName (string)
The name of the column from which to calculate statistics.

Returns

stat (number)
The Durbin–Watson statistic.

Notes

  • A value close to 2 indicates little or no autocorrelation.
  • A value below 2 suggests positive autocorrelation.
  • A value above 2 suggests negative autocorrelation.

Example

// perform the autocorrelation test of Durbin-Watson
var stat = dataFrame.column('revenue').stat.autoCorrDurbinWatson();

// log the test stat
notebook.log(stat);