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()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
2indicates little or no autocorrelation. - A value below
2suggests positive autocorrelation. - A value above
2suggests negative autocorrelation.
Example
// perform the autocorrelation test of Durbin-Watson
var stat = dataFrame.column('revenue').stat.autoCorrDurbinWatson();
// log the test stat
notebook.log(stat);