Testing For Independent Observations

oneway-last-stepIn this final step of developing the oneway advisor I want to check the assumption of “independence”.  Specifically I want to test whether there is any evidence of serial correlation on the residuals.  

The Durbin-Watson Test

Detecting the presence of serial correlation in the residuals can be performed using the Durbin-Watson test that is found under row diagnostics within the Fit Model platform.  Here are the steps:

Specify the model appropriate to the oneway analysis of variance:

fit-model-dialog

Select Durbin-Watson from the Row Diagnostics options:

dw-menu

 

This adds an additional outline to the Fit Model window:

dw-no-p

From the red triangle turn on the option to show the p-value:

dw-with-p

So now we just want to do the same thing in JSL in a function that I will call Test Independent Observations.

Test Independent Observations

This function should be added to the JSL file Analysis Components. (This file was first introduced in step 4).

Invoking the Function

Open file step6.jsl.  The block of code that checks the assumptions can now be extended:

Save the revisions as step7.jsl (no, no, we’ve finished!) “oneway advisor.jsl“.

Final Output

final-output

Share the joy:
facebooktwittergoogle_pluslinkedinmailfacebooktwittergoogle_pluslinkedinmail

One thought on “Testing For Independent Observations”

Leave a Reply