Announcement

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

  • prais vs. xtpcse, correlation(ar1)

    I expected both of these commands to produce the same models when used on the same data but they don't. the xtpcse documentation points the user to the prais documentation too. xtpcse, correlation(ar1) produces a model titled, "Prais-Winsten regression, correlated panels corrected standard errors (PCSEs)," but the coefficients and standard errors and rho are different than when the "prais" command is used. can anyone summarize the model differences here? Note I'm using Stata 16.1.
    Last edited by Jordan Rosenblum; 04 Oct 2023, 09:03.

  • #2
    First of all, prais is a time series estimator whereas xtpcse is designed for panel data. The default in prais is Prais-Winsten AR(1) regression whereas for xtpcse, it is OLS. So you need the option -corr(ar1)- to estimate using Prais-Winsten AR(1) regression. Secondly, prais implements an iterative algorithm to estimate the autocorrelation coefficient (rho). But beyond that, the estimation procedure in xtpcse with option option -corr(ar1)- is indeed Prais-Winsten AR(1) regression. If you concede that a cross-section is a degenerate panel with only 1 time period, then you can show that both estimators produce equivalent results.

    Code:
    webuse idle, clear
    gen id=1
    xtset id t
    xtpcse usr idle,  corr(ar1) independent nmk
    *RESTRICT ITERATIONS IN PRAIS TO 1
    prais usr idle, iter(1)
    Res.:

    Code:
    . xtpcse usr idle,  corr(ar1) independent nmk
    
    Prais-Winsten regression, independent panels corrected standard errors
    
    Group variable:   id                            Number of obs     =         30
    Time variable:    t                             Number of groups  =          1
    Panels:           independent (balanced)        Obs per group:
    Autocorrelation:  common AR(1)                                min =         30
                                                                  avg =         30
                                                                  max =         30
    Estimated covariances      =         1          R-squared         =     0.3200
    Estimated autocorrelations =         1          Wald chi2(1)      =      14.22
    Estimated coefficients     =         2          Prob > chi2       =     0.0002
    
    ------------------------------------------------------------------------------
                 |           Indep-corrected
             usr | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            idle |  -.1739999   .0461407    -3.77   0.000     -.264434   -.0835659
           _cons |   18.52482   3.987253     4.65   0.000     10.70995    26.33969
    -------------+----------------------------------------------------------------
             rho |   .3518376
    ------------------------------------------------------------------------------
    
    . 
    . prais usr idle, iter(1)
    
    Iteration 0:  rho = 0.0000
    Iteration 1:  rho = 0.3518
    
    Prais-Winsten AR(1) regression -- iterated estimates
    
          Source |       SS           df       MS      Number of obs   =        30
    -------------+----------------------------------   F(1, 28)        =     13.18
           Model |  82.4609997         1  82.4609997   Prob > F        =    0.0011
        Residual |  175.214495        28  6.25766054   R-squared       =    0.3200
    -------------+----------------------------------   Adj R-squared   =    0.2957
           Total |  257.675495        29  8.88536189   Root MSE        =    2.5015
    
    ------------------------------------------------------------------------------
             usr | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
    -------------+----------------------------------------------------------------
            idle |  -.1739999   .0461407    -3.77   0.001    -.2685148    -.079485
           _cons |   18.52482   3.987253     4.65   0.000      10.3573    26.69234
    -------------+----------------------------------------------------------------
             rho |   .3518376
    ------------------------------------------------------------------------------
    Durbin-Watson statistic (original)    1.295766
    Durbin-Watson statistic (transformed) 1.436703
    convergence not achieved
    r(430);

    Comment


    • #3
      excellent response, much appreciated.

      Comment

      Working...
      X