Dear all
-xthrtest- is now available on SSC, thanks to Kit Baum. It performs the Born & Breitung (2016) heteroskedasticity-robust test for serial correlation. It takes the combined residuals (fixed effect + idiosyncratic error; option ue in predict) as input and returns the HR statistic described on page 1304 of aforementioned paper, as well as the corresponding p-values.
It only tests for first order serial correlation.
You can specify as many variables to be tested as you want (it loops internally).
Suited for balanced and unbalanced panels, gaps are not allowed.
Example usage
Output is at the bottom of this post.
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
-xthrtest- is now available on SSC, thanks to Kit Baum. It performs the Born & Breitung (2016) heteroskedasticity-robust test for serial correlation. It takes the combined residuals (fixed effect + idiosyncratic error; option ue in predict) as input and returns the HR statistic described on page 1304 of aforementioned paper, as well as the corresponding p-values.
It only tests for first order serial correlation.
You can specify as many variables to be tested as you want (it loops internally).
Suited for balanced and unbalanced panels, gaps are not allowed.
Example usage
Code:
sysuse xtline1, clear xtreg calories, fe predict ue, ue xthrtest ue
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