Announcement

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

  • Number of lags in Fisher-type Dickey-Fuller test (panel data)

    Hello,

    I am wondering how I can determine the number of lags I should use when conducting the Fisher-type Dickey-Fuller test to test panel data for stationarity?

    I have panel data on the quarterly reported costs ("Actual") of 289 projects ("ID") from 2013 to 2019. I declared my dataset as panel data using -xtset-. My research goal is to exame if the quarterly costs can be predicted on project level. My panel data is unbalanced, i.e., not all projects last 7 years. Also, I have some gaps as not all projects reported consistenty on a quarterly basis. Please find an example of the dataset below.

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input float ID byte QrtInt int YearValue float Date double Actual
    2 1 2013 212           265.2611
    2 2 2013 213 334.21302000000003
    2 3 2013 214           671.4628
    2 4 2013 215  929.6637700000001
    2 1 2014 216          457.79724
    2 2 2014 217 465.83238000000006
    2 3 2014 218          443.06652
    2 4 2014 219          170.27506
    2 1 2015 220          188.16879
    2 2 2015 221          272.98868
    2 3 2015 222          245.32497
    2 4 2015 223  439.7882000000001
    end
    format %tq Date
    Due to the unbalancedness of my panel data, I should use the Fisher-tye Dickey-Fuller test (-xtunitroot fisher, dfuller-) to test for stationarity, right?

    If yes, how would I determine the appropriate number of lags for the test? I am currently using an autoregressive AR(4) model as a prediction model, i.e., I use the costs of t-1 to t-4 for each project as the independent variables to predict the costs in the quarter t0. Does that mean that I need to also use 4 lags in the Fisher-type test to test my data for stationarity?

    I decided to use 4 lags in the AR model after I plotted the partial autocorrelation function (PACF) of the time-series data (see corrgram below). However, I used the aggregated quarterly costs of all projects and declared my data as a time-seris (-tsset-). Is there also a way to test for partial autocorrelations within each project when using panel data (-xtset-)?

    Code:
                                              -1       0       1 -1       0       1
     LAG       AC       PAC      Q     Prob>Q  [Autocorrelation]  [Partial Autocor]
    -------------------------------------------------------------------------------
    1        0.4765   0.5448   7.0652  0.0079          |---               |----    
    2        0.4386   0.4124   13.279  0.0013          |---               |---     
    3        0.3219   0.1706   16.762  0.0008          |--                |-       
    4        0.6617   0.9623   32.089  0.0000          |-----             |------- 
    5        0.1644  -0.6763   33.076  0.0000          |-            -----|        
    6        0.1583  -0.3777   34.033  0.0000          |-              ---|        
    7        0.0774   0.5882   34.273  0.0000          |                  |----    
    8        0.3275  -0.1387   38.777  0.0000          |--               -|        
    9       -0.0681   0.2185   38.982  0.0000          |                  |-       
    10      -0.0709   0.0915   39.217  0.0000          |                  |        
    11      -0.1254   0.0174   39.993  0.0000         -|                  |        
    12       0.0551  -0.0434   40.153  0.0001          |                  |
    Thank you very much for your help.

    Best regards,
    Tobias
Working...
X