Dear all,

I am using a balanced data set (T=572 and N=324) in that the error terms are spatial and serial correlated. Moreover, one regressor is endogenous and I have a plausible IV. I plan to use panel corrected standard errors with region-specific AR(1) processes.Stata provides the command xtpcse that works well without using IVs. Hence, I was wondering whether there is a build-in function to implement 2SLS with panel corrected standard errors.

The process is formally described in Woolwridge "Introductory Econometrics" (Capter 15).

2SLS with AR(1) Errors:
(i) Estimate 2SLS and obtain the 2SLS residuals,
(ii) Obtain rho from the regression of u_ t on u_ t -1 and construct the transformed coefficients (y_t - rho*y_t-1), (z_t - rho*z_t-1)
(iii) Estimate Prais-Winsten regression with PCSE

Is there a build in function in Stata to conduct this steps?

Thanks a lot! I am looking forward to your response!