Announcement

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

  • How to get the coefficient and t-statistic of the first-order autoregressive coefficient produced by the Cochrane Orcutt procedure in Stata?

    How to get the coefficient and t-statistic of the first-order autoregressive coefficient produced by the Cochrane Orcutt procedure in Stata?

    Is rho equal to the first-order autoregressive coefficient produced by the Cochrane Orcutt procedure in Stata? If so, how do we get the t-statistics of that coefficient?
    See our Stata output and an example of a similar study below? (Please note: The coefficient (ψ) is an estimate of the first-order autoregressive coefficient produced by the Cochrane Orcutt procedure.

    Click image for larger version

Name:	Skærmbillede 2016-05-08 kl. 11.27.48.png
Views:	2
Size:	76.0 KB
ID:	1339668Click image for larger version

Name:	Skærmbillede 2016-05-08 kl. 11.34.12.png
Views:	1
Size:	283.2 KB
ID:	1339667

    Attached Files

  • #2
    Cross-posted at http://stackoverflow.com/questions/3...cutt-statistic

    Please note our cross-posting policy http://www.statalist.org/forums/help#crossposting which is that you tell us about it.

    Comment


    • #3
      Sorry. I am new at using this forum. But really sorry.

      Comment


      • #4
        Return to this post

        http://www.stata.com/statalist/archi.../msg00647.html
        Emad A. Shehata
        Professor (PhD Economics)
        Agricultural Research Center - Agricultural Economics Research Institute - Egypt
        Email: [email protected]
        IDEAS: http://ideas.repec.org/f/psh494.html
        EconPapers: http://econpapers.repec.org/RAS/psh494.htm
        Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

        Comment


        • #5
          Code:
          clear all
           input t y x1 x2
           1  99.2  96.7   101
           2    99  98.1 100.1
           3   100   100   100
           4 111.6 104.9  90.6
           5 122.2 104.9  86.5
           6 117.6 109.5  89.7
           7 121.1 110.8  90.6
           8   136 112.3  82.8
           9 154.2 109.3  70.1
          10 153.6 105.3  65.4
          11 158.5 101.7  61.3
          12 140.6  95.4  62.5
          13 136.2  96.4  63.6
          14   168  97.6  52.6
          15 154.3 102.4  59.7
          16   149 101.6  59.5
          17 165.5 103.8  61.3
           end
          
           tsset t
           prais y x1 x2 , corc
           matrix b=e(b)'
           matrix v=e(V)
           matrix v = diag(vecdiag(v))
           matrix se = vecdiag(cholesky(v))'
           mata: b= st_matrix("b")
           mata: se= st_matrix("se")
           mata: t=  b:/se
           mata: t=st_matrix("t",t)
           matrix stat = b , t
           matlist stat

          HTML Code:
          .  prais y x1 x2 , corc
          
          Iteration 0:  rho = 0.0000
          Iteration 1:  rho = -0.1824
          Iteration 2:  rho = -0.1603
          Iteration 3:  rho = -0.1564
          Iteration 4:  rho = -0.1557
          Iteration 5:  rho = -0.1556
          Iteration 6:  rho = -0.1555
          Iteration 7:  rho = -0.1555
          Iteration 8:  rho = -0.1555
          
          Cochrane-Orcutt AR(1) regression -- iterated estimates
          
                Source |       SS       df       MS              Number of obs =      16
          -------------+------------------------------           F(  2,    13) =  160.30
                 Model |   9404.0186     2   4702.0093           Prob > F      =  0.0000
              Residual |  381.325374    13  29.3327211           R-squared     =  0.9610
          -------------+------------------------------           Adj R-squared =  0.9550
                 Total |  9785.34397    15  652.356265           Root MSE      =   5.416
          
          ------------------------------------------------------------------------------
                     y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
          -------------+----------------------------------------------------------------
                    x1 |   1.168129   .2487314     4.70   0.000     .6307779    1.705481
                    x2 |  -1.413293   .0790578   -17.88   0.000    -1.584087   -1.242499
                 _cons |   121.6113   24.50442     4.96   0.000     68.67271    174.5499
          -------------+----------------------------------------------------------------
                   rho |  -.1555319
          ------------------------------------------------------------------------------
          Durbin-Watson statistic (original)    2.018549
          Durbin-Watson statistic (transformed) 2.027891
          .  matrix b=e(b)'
          .  matrix v=e(V)
          .  matrix v = diag(vecdiag(v))
          .  matrix se = vecdiag(cholesky(v))'
          .  mata: b= st_matrix("b")
          .  mata: se= st_matrix("se")
          .  mata: t=  b:/se
          .  mata: t=st_matrix("t",t)
          .  matrix stat = b , t
          .  matlist stat
          
                       |        y1         c1
          -------------+----------------------
                    x1 |  1.168129   4.696349
                    x2 | -1.413293  -17.87671
                 _cons |  121.6113    4.96283
          Last edited by Emad Shehata; 08 May 2016, 17:04.
          Emad A. Shehata
          Professor (PhD Economics)
          Agricultural Research Center - Agricultural Economics Research Institute - Egypt
          Email: [email protected]
          IDEAS: http://ideas.repec.org/f/psh494.html
          EconPapers: http://econpapers.repec.org/RAS/psh494.htm
          Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

          Comment


          • #6
            Thanks for your answer. However, I do not really see, how to get the t-statistics on the first order autoregressive coefficient (rho?) from that output?

            Comment


            • #7
              Dear Mathias

              However, I do not really see, how to get the t-statistics on the first order autoregressive coefficient (rho?) from that output?
              Now I think you dont know the difference between Iterative Cochrane-Orcutt transformation and MLE of Cochrane-Orcutt
              Rho value in the example above not parameter coefficient but a calculated scalar.
              Emad A. Shehata
              Professor (PhD Economics)
              Agricultural Research Center - Agricultural Economics Research Institute - Egypt
              Email: [email protected]
              IDEAS: http://ideas.repec.org/f/psh494.html
              EconPapers: http://econpapers.repec.org/RAS/psh494.htm
              Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

              Comment


              • #8
                any how if you are interested in to know the t-test of Rho
                follow the next steps:


                HTML Code:
                prais y x1 x2 , corc
                predict double e , res
                reg  e L.e , noconst
                HTML Code:
                 prais y x1 x2 , corc
                
                Iteration 0:  rho = 0.0000
                Iteration 1:  rho = -0.1824
                Iteration 2:  rho = -0.1603
                Iteration 3:  rho = -0.1564
                Iteration 4:  rho = -0.1557
                Iteration 5:  rho = -0.1556
                Iteration 6:  rho = -0.1555
                Iteration 7:  rho = -0.1555
                Iteration 8:  rho = -0.1555
                
                Cochrane-Orcutt AR(1) regression -- iterated estimates
                
                      Source |       SS       df       MS              Number of obs =      16
                -------------+------------------------------           F(  2,    13) =  160.30
                       Model |   9404.0186     2   4702.0093           Prob > F      =  0.0000
                    Residual |  381.325374    13  29.3327211           R-squared     =  0.9610
                -------------+------------------------------           Adj R-squared =  0.9550
                       Total |  9785.34397    15  652.356265           Root MSE      =   5.416
                
                ------------------------------------------------------------------------------
                           y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                          x1 |   1.168129   .2487314     4.70   0.000     .6307779    1.705481
                          x2 |  -1.413293   .0790578   -17.88   0.000    -1.584087   -1.242499
                       _cons |   121.6113   24.50442     4.96   0.000     68.67271    174.5499
                -------------+----------------------------------------------------------------
                         rho |  -.1555319
                ------------------------------------------------------------------------------
                Durbin-Watson statistic (original)    2.018549
                Durbin-Watson statistic (transformed) 2.027891
                
                . predict double e , res
                
                . reg  e L.e , noconst
                
                      Source |       SS       df       MS              Number of obs =      16
                -------------+------------------------------           F(  1,    15) =    0.34
                       Model |  8.66958701     1  8.66958701           Prob > F      =  0.5679
                    Residual |  381.325374    15  25.4216916           R-squared     =  0.0222
                -------------+------------------------------           Adj R-squared = -0.0430
                       Total |  389.994961    16  24.3746851           Root MSE      =   5.042
                
                ------------------------------------------------------------------------------
                           e |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                -------------+----------------------------------------------------------------
                           e |
                         L1. |  -.1555317   .2663312    -0.58   0.568    -.7232032    .4121397
                ------------------------------------------------------------------------------
                
                .
                Emad A. Shehata
                Professor (PhD Economics)
                Agricultural Research Center - Agricultural Economics Research Institute - Egypt
                Email: [email protected]
                IDEAS: http://ideas.repec.org/f/psh494.html
                EconPapers: http://econpapers.repec.org/RAS/psh494.htm
                Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

                Comment


                • #9
                  You are right, I am new at doing this - but I think the proposed method is exactly, what I needed. THANKS for helping!

                  Comment


                  • #10
                    You can use also NLS estimationas follows:


                    Code:
                    clear all
                     input t y x1 x2
                     1  99.2  96.7   101
                     2    99  98.1 100.1
                     3   100   100   100
                     4 111.6 104.9  90.6
                     5 122.2 104.9  86.5
                     6 117.6 109.5  89.7
                     7 121.1 110.8  90.6
                     8   136 112.3  82.8
                     9 154.2 109.3  70.1
                    10 153.6 105.3  65.4
                    11 158.5 101.7  61.3
                    12 140.6  95.4  62.5
                    13 136.2  96.4  63.6
                    14   168  97.6  52.6
                    15 154.3 102.4  59.7
                    16   149 101.6  59.5
                    17 165.5 103.8  61.3
                     end
                    
                     tsset t
                     gen y1=L.y
                     gen x11=L.x1
                     gen x21=L.x2
                     prais y x1 x2 , corc
                     nl (y=({B1}*x1+{B2}*x2+{B0}-{R}*({B1}*x11+{B2}*x21+{B0}))+{R}*y1) in 2/17
                    HTML Code:
                    .  tsset t
                    .  gen y1=L.y
                    (1 missing value generated)
                    
                    .  gen x11=L.x1
                    (1 missing value generated)
                    
                    .  gen x21=L.x2
                    (1 missing value generated)
                    
                    .  prais y x1 x2 , corc
                    
                    Iteration 0:  rho = 0.0000
                    Iteration 1:  rho = -0.1824
                    Iteration 2:  rho = -0.1603
                    Iteration 3:  rho = -0.1564
                    Iteration 4:  rho = -0.1557
                    Iteration 5:  rho = -0.1556
                    Iteration 6:  rho = -0.1555
                    Iteration 7:  rho = -0.1555
                    Iteration 8:  rho = -0.1555
                    
                    Cochrane-Orcutt AR(1) regression -- iterated estimates
                    
                          Source |       SS       df       MS              Number of obs =      16
                    -------------+------------------------------           F(  2,    13) =  160.30
                           Model |   9404.0186     2   4702.0093           Prob > F      =  0.0000
                        Residual |  381.325374    13  29.3327211           R-squared     =  0.9610
                    -------------+------------------------------           Adj R-squared =  0.9550
                           Total |  9785.34397    15  652.356265           Root MSE      =   5.416
                    
                    ------------------------------------------------------------------------------
                               y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                              x1 |   1.168129   .2487314     4.70   0.000     .6307779    1.705481
                              x2 |  -1.413293   .0790578   -17.88   0.000    -1.584087   -1.242499
                           _cons |   121.6113   24.50442     4.96   0.000     68.67271    174.5499
                    -------------+----------------------------------------------------------------
                             rho |  -.1555319
                    ------------------------------------------------------------------------------
                    Durbin-Watson statistic (original)    2.018549
                    Durbin-Watson statistic (transformed) 2.027891
                    
                    .  nl (y=({B1}*x1+{B2}*x2+{B0}-{R}*({B1}*x11+{B2}*x21+{B0}))+{R}*y1) in 2/17
                    (obs = 16)
                    
                    Iteration 0:  residual SS =  9926.351
                    Iteration 1:  residual SS =  424.7784
                    Iteration 2:  residual SS =  381.5585
                    Iteration 3:  residual SS =  381.3257
                    Iteration 4:  residual SS =  381.3254
                    Iteration 5:  residual SS =  381.3254
                    Iteration 6:  residual SS =  381.3254
                    Iteration 7:  residual SS =  381.3254
                    
                          Source |       SS       df       MS
                    -------------+------------------------------         Number of obs =        16
                           Model |  7188.51265     3  2396.17088         R-squared     =    0.9496
                        Residual |  381.325374    12  31.7771145         Adj R-squared =    0.9370
                    -------------+------------------------------         Root MSE      =  5.637119
                           Total |  7569.83803    15  504.655869         Res. dev.     =  96.14306
                    
                    ------------------------------------------------------------------------------
                               y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
                    -------------+----------------------------------------------------------------
                             /B1 |   1.168129   .2705726     4.32   0.001     .5786022    1.757657
                             /B2 |  -1.413293   .0881198   -16.04   0.000    -1.605289   -1.221296
                             /B0 |   121.6113   26.14065     4.65   0.001     64.65571    178.5669
                              /R |  -.1555315   .3240643    -0.48   0.640     -.861607    .5505439
                    ------------------------------------------------------------------------------
                      Parameter B0 taken as constant term in model & ANOVA table
                    Emad A. Shehata
                    Professor (PhD Economics)
                    Agricultural Research Center - Agricultural Economics Research Institute - Egypt
                    Email: [email protected]
                    IDEAS: http://ideas.repec.org/f/psh494.html
                    EconPapers: http://econpapers.repec.org/RAS/psh494.htm
                    Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

                    Comment


                    • #11
                      Re your reply at #9: this is not what you wanted because it does take into account that the residuals are estimated and not observed.
                      The NLS method in #10 is preferable because it jointly estimates the beta coefficients and rho.

                      Comment


                      • #12
                        Dear Eric
                        You are right

                        Either NLS or MLE methods are preferable for joint estimation of beta coefficients and rho.
                        In addition MLE takes into account estimation of Sigma
                        Emad A. Shehata
                        Professor (PhD Economics)
                        Agricultural Research Center - Agricultural Economics Research Institute - Egypt
                        Email: [email protected]
                        IDEAS: http://ideas.repec.org/f/psh494.html
                        EconPapers: http://econpapers.repec.org/RAS/psh494.htm
                        Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

                        Comment


                        • #13
                          What is the difference between Prais-Winsten and Cochrane-Orcutt?

                          Comment


                          • #14
                            The only difference between Prais-Winsten and Cochrane-Orcutt according to autoregressive least squares method is the last drops the first observation and the estimation starts from the second observation.
                            Emad A. Shehata
                            Professor (PhD Economics)
                            Agricultural Research Center - Agricultural Economics Research Institute - Egypt
                            Email: [email protected]
                            IDEAS: http://ideas.repec.org/f/psh494.html
                            EconPapers: http://econpapers.repec.org/RAS/psh494.htm
                            Google Scholar: http://scholar.google.com/citations?...r=cOXvc94AAAAJ

                            Comment


                            • #15
                              Thank you dear Emad Shehata
                              Either NLS or MLE methods are preferable for joint estimation of beta coefficients and rho.
                              In addition MLE takes into account estimation of Sigma
                              where I can find MLE method in Stata for Cochrane-Orcutt ?
                              thanks

                              Comment

                              Working...
                              X