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

  • - xtistest - now on SSC: Portmanteau IS test for serial correlation in a fixed effect panel setting

    Dear all

    -xtistest- is now available on SSC, thanks to Kit Baum. It performs the Inoue & Solon (2006) Portmanteau test for serial correlation. It takes the standard residuals (option e in predict) as input and returns the IS statistic as well as the corresponding p-values.

    By default is tests for any order of serial correlation, but I recommend restricting it to say, 2nd order correlations by adding the lags(2) option. That said, even with that restricting, the test requires N to be large relative to T. If you are not in a large N, small T framework, I recommend using -xtqptest-. The big advantage of this test is that it allows for gaps in the data, which is not the case for -xtqptest-.

    You can specify as many variables to be tested as you want (it loops internally).

    Suited for balanced and unbalanced panels and gapped data.

    Example usage
    sysuse xtline1, clear
    xtreg calories, fe
    predict e, e
    xtistest e, lags(2)
    Output is at the bottom of this post. As you can see, this setting (T >> N) is not suitable for xtistest. The program will produce a warning as long as N < 0.8T, but don't rely on it.


    Testing for Serial Correlation in Fixed-Effects Panel Data Models, Benjamin Born and Jörg Breitung, Econometric Reviews 2016

    Click image for larger version

Name:	xtistest.PNG
Views:	1
Size:	46.6 KB
ID:	1356770

  • #2
    xtistest has been updated, much thanks go to Kit Baum.

    1. Bug fix: Messy unbalanced panels would lead the command to allocate the wrong observations to the wrong panel units. This has now been fixed (as far as I can tell, bug reports always welcome).
    2. Specifying xtistest without any lag specification now defaults to 2 lags instead of all of them.
    3. If you still want to use all lags, specify lags(all).