Dear all
I have implemented to Born & Breitung (2016) bias-corrected LM-based test for serial correlation. It takes the combined residuals (fixed effect + idiosyncratic error; option ue in predict) as input and returns the Q(p) statistic described on page 1303 of aforementioned paper, as well as the corresponding p-values.
It takes on option p, which is the order up to which should be checked for serial correlation. E.g. if p = 3, the null hypothesis is H0: No serial correlation up to order 3. If it is not specified, I set the default to 2 (somewhat arbitrarily).
Example usage
Output is at the bottom of this post.
Any comments or criticisms before I forward this to ssc? In addition, any idea what the lowest Stata version would be on which this works? I've tried an earlier version on Stata 12 and that worked.
Cheers
Jesse
References
Testing for Serial Correlation in Fixed-Effects Panel Data Models, Benjamin Born and Jörg Breitung, Econometric Reviews 2016
http://www.tandfonline.com/doi/abs/1...38.2014.976524

I have implemented to Born & Breitung (2016) bias-corrected LM-based test for serial correlation. It takes the combined residuals (fixed effect + idiosyncratic error; option ue in predict) as input and returns the Q(p) statistic described on page 1303 of aforementioned paper, as well as the corresponding p-values.
It takes on option p, which is the order up to which should be checked for serial correlation. E.g. if p = 3, the null hypothesis is H0: No serial correlation up to order 3. If it is not specified, I set the default to 2 (somewhat arbitrarily).
Example usage
Code:
sysuse xtline1, clear xtreg calories, fe predict ue, ue xtqptest ue xtqptest ue, p(1)
Any comments or criticisms before I forward this to ssc? In addition, any idea what the lowest Stata version would be on which this works? I've tried an earlier version on Stata 12 and that worked.
Cheers
Jesse
References
Testing for Serial Correlation in Fixed-Effects Panel Data Models, Benjamin Born and Jörg Breitung, Econometric Reviews 2016
http://www.tandfonline.com/doi/abs/1...38.2014.976524

Comment