REGPCSE Procedure |
@REGPCSE is a regression post processor which can be applied after a LINREG to reprint the regression with some form of "panel corrected standard errors". The original reference on this is Beck and Katz (1995) which corrects for contemporaneous covariance among the individuals in a panel data set. This can be used when the number of observations (T) is small enough relative to the number of individual (N) that SUR estimates with an empirical covariance matrix are likely to have poor properties. You can also correct for individual HAC (autocorrelation just within individuals) and panel HAC (autocorrelation across individuals).
This should only be used on a balanced panel. It should be used only after a LINREG.
@REGPCSE( options ) (no parameters)
Options
METHOD=[PCSE]/IHAC/PHAC
Chooses the correction method. PCSE is Beck-Katz. IHAC is individual HAC. PHAC is panel HAC.
LAGS=number of lags in IHAC and PHAC
A Bartlett (Newey-West) window is used.
TITLE=title for regression output ["OLS with (description) Covariance Matrix"]
Example
open data oilforecasts.rat
cal(panel=36,q) 2002:1
data(format=rats) 1//2002:1 25//2010:4
table / oil0 to oil4
*
* Unbiasedness tests
*
dofor n = 0 1 2 3 4
compute fseries=%s("oil"+n)
set dfore = log(fseries{0}/act)
set dact = log(act(t+n+1)/act)
linreg(noprint) dact
# constant dfore
@regpcse(method=phac,lags=n)
test(vector=||0.0,1.0||,whole,title="Test of Unbiasedness "+(n+1)+" steps")
end dofor n
Sample Output
Basically, it's the same as the least squares output but with recomputed standard errors (and covariance matrix).
Linear Regression - Estimation by OLS with Panel HAC Covariance Matrix
Dependent Variable DACT
Panel(36) of Quarterly Data From 1//2002:01 To 25//2010:04
Usable Observations 775
Degrees of Freedom 773
Skipped/Missing (from 900) 125
Mean of Dependent Variable 0.1717836766
Std Error of Dependent Variable 0.3676927398
Standard Error of Estimate 0.3617956628
Sum of Squared Residuals 101.18268655
Durbin-Watson Statistic 0.6561
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant 0.2168538261 0.1412657191 1.53508 0.12476479
2. DFORE 0.3926211341 0.4271388982 0.91919 0.35799702
Copyright © 2026 Thomas A. Doan