No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing for issues of independence and RACplot

    I have used the Regression Diagnostics blog on to check that a regression model I've built to measure the outcome of in intervention in family doctors in Scotland has had any effect. The last test in the blog relates to issue of independence (clustering/autocorrelation) and I have applied the Durbin-Watson statistic test to the dataset.

    An index value (1 to 233 corresponding to the number of GP practices in the study) has was used as the time variable.

    The Durbin-Watson statistic is 1.86 and the scatter plot for the residuals is attached.

    The RACplot is attached.

    I'm struggling to interpret the Durbin-Watson statistic coupled with the RACplot and presume that because the autocorrelations of the residuals (blue lines) are sometimes outside the MA(q) 95% CI (grey band) that there is evidence of autocorrelation.

    The syntax I used was

    generate index = _n
    tsset index
    regress Outcome i.Interven1Control0 Baseline Deprivation i.Locality
    predict r, resid
    scatter r index, yline(0)


    Sean MacBride-Stewart

  • #2
    Unless this is a test message, you've posted in the wrong forum. The Sandbox is used to "to make test posts, practice with the formatting features of the forum software, etc" . Post in the General Forum. But before you do, read the FAQ, especially FAQ 12, which asks that you put all code and results between CODE delimiters. FAQ 12.4 says
    Stata graphs should be posted as .png file attachments (start with the Clipboard icon).
    See FAQ 12.5 for the reason that gph files are a poor choice of format. Another one: when I tried to click yours, they opened up in a text editor on my system.
    Steve Samuels
    Statistical Consulting