Announcement

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

  • Lag length in panel data


    Dear Statalisters,
    I have an unbalanced panel and was looking for a way to determine optimal lag length in panels.
    ​​​
    I run Fisher-type test, Augmented DF, ADF
    Code:
    xtunitroot fisher varname, dfuller lags(0)
    and it works for unit root test.

    My question is how do I get the optimal lag length in panel?
    I know how to do that in the VARs. What about panels, thought?
    I will run a normal panel, if that is of interest

    Thank you.
    Mario Ferri
    Last edited by Mario Ferri; 29 Mar 2022, 18:54.

  • #2
    In the panel data set what comes before unit root test is cross-sectional dependence test; this is because the distinction between first-generation ( LLC and IPS) and second-generation is based upon cross-sectional dependence and you will use the latter in case the dataset has cross-sectional dependence. The optimal lag determination I found from different stata forum is :

    forval i=1/11{

    rdl Y X1 X2 X3 X4 if (country ==`i'), maxlags(2 2 2 2 2 )
    matrix list e (lags)
    di
    }


    where 11 is no. of panel unit; country: panel unit; 2, 2, 2, 2, 2, maximum lag as much as no. of variables

    Comment


    • #3
      You may use pvarsoc command. It can be installed by using the command search pvarsoc. It provides optimal lag length using J-statistic and AIC criteria.

      Comment

      Working...
      X