Announcement

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

  • Questions on Autocorrelation tests

    Greetings,

    I am facing difficulty in determining what AR(p) model to specify for my regression. By trial and error depicted below, it seems to me that an AR(4) model should be specified.

    Code:
    . reg r L.r
    
          Source |       SS           df       MS      Number of obs   =     2,347
    -------------+----------------------------------   F(1, 2345)      =    854.20
           Model |  215.345089         1  215.345089   Prob > F        =    0.0000
        Residual |  591.179315     2,345  .252102053   R-squared       =    0.2670
    -------------+----------------------------------   Adj R-squared   =    0.2667
           Total |  806.524404     2,346  .343787043   Root MSE        =     .5021
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .5165801    .017675    29.23   0.000       .48192    .5512403
                 |
           _cons |   .0002531   .0103641     0.02   0.981    -.0200706    .0205769
    ------------------------------------------------------------------------------
    
    . actest, robust
    
    Cumby-Huizinga test for autocorrelation
      H0: variable is MA process up to order q
      HA: serial correlation present at specified lags >q
    -----------------------------------------------------------------------------
      H0: q=0 (serially uncorrelated)        |  H0: q=specified lag-1
      HA: s.c. present at range specified    |  HA: s.c. present at lag specified
    -----------------------------------------+-----------------------------------
        lags   |      chi2      df     p-val | lag |      chi2      df     p-val
    -----------+-----------------------------+-----+-----------------------------
       1 -  1  |     72.136      1    0.0000 |   1 |     72.136      1    0.0000
    -----------------------------------------------------------------------------
      Test allows predetermined regressors/instruments
      Test robust to heteroskedasticity
    
    . reg r L(1/2).r
    
          Source |       SS           df       MS      Number of obs   =     2,346
    -------------+----------------------------------   F(2, 2343)      =    502.98
           Model |  242.009015         2  121.004507   Prob > F        =    0.0000
        Residual |  563.671128     2,343  .240576666   R-squared       =    0.3004
    -------------+----------------------------------   Adj R-squared   =    0.2998
           Total |  805.680142     2,345  .343573621   Root MSE        =    .49049
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .4050162   .0201763    20.07   0.000     .3654511    .4445814
             L2. |   .2148748   .0201672    10.65   0.000     .1753273    .2544222
                 |
           _cons |   .0004264   .0101266     0.04   0.966    -.0194316    .0202844
    ------------------------------------------------------------------------------
    
    . actest, robust
    
    Cumby-Huizinga test for autocorrelation
      H0: variable is MA process up to order q
      HA: serial correlation present at specified lags >q
    -----------------------------------------------------------------------------
      H0: q=0 (serially uncorrelated)        |  H0: q=specified lag-1
      HA: s.c. present at range specified    |  HA: s.c. present at lag specified
    -----------------------------------------+-----------------------------------
        lags   |      chi2      df     p-val | lag |      chi2      df     p-val
    -----------+-----------------------------+-----+-----------------------------
       1 -  1  |     24.707      1    0.0000 |   1 |     24.707      1    0.0000
    -----------------------------------------------------------------------------
      Test allows predetermined regressors/instruments
      Test robust to heteroskedasticity
    
    . reg r L(1/3).r
    
          Source |       SS           df       MS      Number of obs   =     2,345
    -------------+----------------------------------   F(3, 2341)      =    350.83
           Model |  249.790432         3  83.2634773   Prob > F        =    0.0000
        Residual |  555.593235     2,341  .237331583   R-squared       =    0.3102
    -------------+----------------------------------   Adj R-squared   =    0.3093
           Total |  805.383667     2,344  .343593715   Root MSE        =    .48717
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .3792806   .0205235    18.48   0.000     .3390345    .4195267
             L2. |    .166328   .0216949     7.67   0.000     .1237849    .2088712
             L3. |   .1196588   .0205112     5.83   0.000     .0794368    .1598807
                 |
           _cons |   .0004293   .0100602     0.04   0.966    -.0192986    .0201571
    ------------------------------------------------------------------------------
    
    . actest, robust
    
    Cumby-Huizinga test for autocorrelation
      H0: variable is MA process up to order q
      HA: serial correlation present at specified lags >q
    -----------------------------------------------------------------------------
      H0: q=0 (serially uncorrelated)        |  H0: q=specified lag-1
      HA: s.c. present at range specified    |  HA: s.c. present at lag specified
    -----------------------------------------+-----------------------------------
        lags   |      chi2      df     p-val | lag |      chi2      df     p-val
    -----------+-----------------------------+-----+-----------------------------
       1 -  1  |      8.350      1    0.0039 |   1 |      8.350      1    0.0039
    -----------------------------------------------------------------------------
      Test allows predetermined regressors/instruments
      Test robust to heteroskedasticity
    
    . reg r L(1/4).r
    
          Source |       SS           df       MS      Number of obs   =     2,344
    -------------+----------------------------------   F(4, 2339)      =    268.14
           Model |  253.178313         4  63.2945781   Prob > F        =    0.0000
        Residual |  552.116947     2,339  .236048289   R-squared       =    0.3144
    -------------+----------------------------------   Adj R-squared   =    0.3132
           Total |   805.29526     2,343  .343702629   Root MSE        =    .48585
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .3706284   .0206157    17.98   0.000     .3302014    .4110555
             L2. |   .1549074   .0219103     7.07   0.000     .1119418    .1978729
             L3. |   .0928425   .0219076     4.24   0.000     .0498822    .1358027
             L4. |   .0720645   .0206045     3.50   0.000     .0316596    .1124695
                 |
           _cons |   .0001068   .0100351     0.01   0.992    -.0195718    .0197855
    ------------------------------------------------------------------------------
    
    . actest, robust
    
    Cumby-Huizinga test for autocorrelation
      H0: variable is MA process up to order q
      HA: serial correlation present at specified lags >q
    -----------------------------------------------------------------------------
      H0: q=0 (serially uncorrelated)        |  H0: q=specified lag-1
      HA: s.c. present at range specified    |  HA: s.c. present at lag specified
    -----------------------------------------+-----------------------------------
        lags   |      chi2      df     p-val | lag |      chi2      df     p-val
    -----------+-----------------------------+-----+-----------------------------
       1 -  1  |      1.225      1    0.2684 |   1 |      1.225      1    0.2684
    -----------------------------------------------------------------------------
      Test allows predetermined regressors/instruments
      Test robust to heteroskedasticity
    
    . **ACTEST COMMAND SUGGESTS AR(4)**
    
    . reg r L(1/4).r
    
          Source |       SS           df       MS      Number of obs   =     2,344
    -------------+----------------------------------   F(4, 2339)      =    268.14
           Model |  253.178313         4  63.2945781   Prob > F        =    0.0000
        Residual |  552.116947     2,339  .236048289   R-squared       =    0.3144
    -------------+----------------------------------   Adj R-squared   =    0.3132
           Total |   805.29526     2,343  .343702629   Root MSE        =    .48585
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .3706284   .0206157    17.98   0.000     .3302014    .4110555
             L2. |   .1549074   .0219103     7.07   0.000     .1119418    .1978729
             L3. |   .0928425   .0219076     4.24   0.000     .0498822    .1358027
             L4. |   .0720645   .0206045     3.50   0.000     .0316596    .1124695
                 |
           _cons |   .0001068   .0100351     0.01   0.992    -.0195718    .0197855
    ------------------------------------------------------------------------------
    
    . estat bgodfrey
    
    Breusch-Godfrey LM test for autocorrelation
    ---------------------------------------------------------------------------
        lags(p)  |          chi2               df                 Prob > chi2
    -------------+-------------------------------------------------------------
           1     |          7.146               1                   0.0075
    ---------------------------------------------------------------------------
                            H0: no serial correlation
    
    . reg r L(1/5).r
    
          Source |       SS           df       MS      Number of obs   =     2,343
    -------------+----------------------------------   F(5, 2337)      =    217.60
           Model |  253.895887         5  50.7791773   Prob > F        =    0.0000
        Residual |  545.359929     2,337  .233358977   R-squared       =    0.3177
    -------------+----------------------------------   Adj R-squared   =    0.3162
           Total |  799.255815     2,342   .34127063   Root MSE        =    .48307
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .3662664   .0205618    17.81   0.000     .3259452    .4065876
             L2. |   .1551372   .0218684     7.09   0.000     .1122537    .1980207
             L3. |   .0937314    .022019     4.26   0.000     .0505525    .1369103
             L4. |   .0703822   .0218659     3.22   0.001     .0275036    .1132607
             L5. |   .0109803   .0205456     0.53   0.593    -.0293091    .0512698
                 |
           _cons |  -.0010002   .0099799    -0.10   0.920    -.0205707    .0185702
    ------------------------------------------------------------------------------
    
    . estat bgodfrey
    
    Breusch-Godfrey LM test for autocorrelation
    ---------------------------------------------------------------------------
        lags(p)  |          chi2               df                 Prob > chi2
    -------------+-------------------------------------------------------------
           1     |         22.015               1                   0.0000
    ---------------------------------------------------------------------------
                            H0: no serial correlation
    
    . reg r L(1/6).r
    
          Source |       SS           df       MS      Number of obs   =     2,342
    -------------+----------------------------------   F(6, 2335)      =    181.23
           Model |  251.154059         6  41.8590099   Prob > F        =    0.0000
        Residual |  539.330146     2,335  .230976508   R-squared       =    0.3177
    -------------+----------------------------------   Adj R-squared   =    0.3160
           Total |  790.484206     2,341   .33766946   Root MSE        =     .4806
    
    ------------------------------------------------------------------------------
               r |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               r |
             L1. |   .3555388   .0205829    17.27   0.000     .3151761    .3959014
             L2. |   .1525293   .0218011     7.00   0.000     .1097778    .1952809
             L3. |   .0918417   .0219918     4.18   0.000     .0487162    .1349672
             L4. |   .0658227   .0219911     2.99   0.003     .0226985    .1089468
             L5. |    -.00477   .0218076    -0.22   0.827    -.0475342    .0379943
             L6. |   .0498962   .0204418     2.44   0.015     .0098103    .0899821
                 |
           _cons |  -.0019319    .009931    -0.19   0.846    -.0214064    .0175426
    ------------------------------------------------------------------------------
    
    . estat bgodfrey
    
    Breusch-Godfrey LM test for autocorrelation
    ---------------------------------------------------------------------------
        lags(p)  |          chi2               df                 Prob > chi2
    -------------+-------------------------------------------------------------
           1     |          2.459               1                   0.1169
    ---------------------------------------------------------------------------
                            H0: no serial correlation
    
    ** B-G LM test suggests AR(6)**
    For all it's worth, I attach my ACF and PACF graphs for residuals.
    Click image for larger version

Name:	RESIDUALS AC2.png
Views:	1
Size:	32.4 KB
ID:	1436431

    Click image for larger version

Name:	RESIDUALS PAC.png
Views:	1
Size:	28.8 KB
ID:	1436432




    Any help would be very much appreciated, thank you.
    Last edited by sladmin; 09 Apr 2018, 08:53. Reason: anonymize poster
Working...
X