Regression - Diagnostic - StandardRPlot - Test Residual Serial Correlation (Durbin-Watson)

From Q
Jump to navigation Jump to search

Conduct a Durbin-Watson test of serial correlation (auto-correlation) on the residuals

Code

var heading_text = "Test Residual Serial Correlation";
if (!!form.setObjectInspectorTitle)
    form.setObjectInspectorTitle(heading_text);
else
    form.setHeading(heading_text);

form.dropBox({ name: "formInput", label: "Regression:", types: ["RItem:Regression"],
    prompt: "Select a Regression output to shpw diagnostics for" });
test.serial.correlation <- flipFormat::SignificanceTest(
    flipRegression::DurbinWatson(formInput),
    'Test of Residual Serial Correlation (Durbin-Watson)',
    vars = NULL,
    reg.name =  NULL,
    reg.sample.description = formInput$sample.description)