Skip to content

ENH: diagnostic tests for panel data (LM test for autocorrelation, heteroscedasticity) #2756

Open

Description

@josef-pkt

add diagnostic tests for panel data - LM test for serail correlation, heteroscedasticity, cross-sectional correlation and similar.

I ran into breusch-pagan test for panel data. The tests have a similar structure as the ones for OLS, but go in more directions and have to watch out for incidental parameter problem when removing fixed effects (one way or two way).

some links
http://www.princeton.edu/~otorres/Panel101.pdf Panel Data Analysis Fixed and Random Effects using Stata (v. 4.2): overview of Stata in 2007, second part has diagnostic tests, several by users.
http://www.stata-journal.com/sjpdf.html?articlenum=st0039 "Testing for serial correlation in linear panel-data models" Stata buitin xtserial, implements Wooldridge 2002
http://www.stata-journal.com/sjpdf.html?articlenum=st0004 "Residual diagnostics for cross-section time series regression models" Baum, available at ssc, after one-way fixed effects regression

recent paper for heteroscedasticity
Juhl, Ted, and Walter Sosa-Escudero. "Testing for heteroskedasticity in fixed effects models." Journal of Econometrics 178 (2014): 484-494.
(no citation in Google, but "standard" implementation for robust tests Davidson MacKinnon and Wooldridge artificial regression, looks good.)

Some recent papers also look at two-way fixed effect (individual and time FE)

Baltagi, Baltagi and Li have several papers but I never got far in reading those.


partially related to FE modelling in panel data or more generally,
e.g. #2568 (absorb FE) and #2745 (move pandas stats models)
and conditional estimation Chamberlain style remove FE or RE.

Activity

  1. josef-pkt commented on Jan 14, 2016

    @josef-pkt
    MemberAuthor

    R plm also has a set of diagnostic tests like these, based on vignette

  2. josef-pkt commented on Jan 14, 2016

    @josef-pkt
    MemberAuthor

    general thought:

    Even if some of these functionality like diagnostic tests are just "one-liners" it's useful to add them.

    Currently, I don't know which test is which generic calculation. And I don't know which generic test or test that was designed for OLS applies to different models. (With the right recipes or following some textbooks they are easy to calculate, at least in some cases.)
    And generic tests are more difficult to cite, when the specific test has a name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions