Hello,
If you have firm-year panel data and you want to specify fixed effects on industry and year, and cluster adjust standard errors at firm level, the appropriate procedure to use is PROC PANEL. The SURVEYREG procedure is designed for survey data, not panel data. PROC GLM does not provide functionality to obtain cluster adjustment on standard errors, and neither does PROC TSCSREG.
In PROC PANEL, you can use CLUSTER option together with HCCME = option in the MODEL statement to request heteroscedasticity and cluster adjusted standard errors on the cross section dimension(firm in your case). The following usage note provides more details on how to use the CLUSTER option in several different scenarios with example syntax:
https://support.sas.com/kb/67/322.html
To specify industry fixed effects, you can specify the industry_id variable in the CLASS statement and the MODEL statement, and specify POOLED option to request pooled OLS regression. To specify year fixed effects, you can either specify year variable together with industry_id variable in the CLASS statement and MODEL statement, and specify POOLED option, or you can also specify FIXONETIME option instead of POOLED option without having to specify the year variable in the CLASS and MODEL statements, since the FIXONETIME option automatically includes time (year) fixed effects in the model. However, as discussed in the above usage note, please be aware that there is some difference in the cluster adjustment regarding the time(year) fixed effects estimates using these two approaches: If you specify the year variable in the CLASS and MODEL statement and specify POOLED option, the cluster adjustment applies to the year fixed effects estimates as well. If you specify FIXONETIME option instead of POOLED option, then the hccme and cluster adjustment does not apply to the year fixed effects.
Following is an example using these two approaches in PROC PANEL to specify fixed effects on industry and year and obtain cluster adjustment on firm level. Note that HCCME = 1 in the code is only an example. You can choose HCCME = 0, 1, 2, 3 to be used together with the CLUSTER option as discussed in the above usage note.
/*method 1: specify industry_id and year in CLASS and MODEL statements, and specify
POOLED option */
ods select parameterestimates; proc panel data=testset; id firm_id year; class Industry_id year ; model Y = X1 X2 X3 Industry_id year/pooled hccme=1 cluster ; run;
/*method 2: specify industry_id only in the CLASS and MODEL statements, specify FIXONETIME option in MODEL statement*/
ods select parameterestimates; proc panel data=testset; id firm_id year; class Industry_id ; model Y = X1 X2 X3 Industry_id /fixonetime printfixed hccme=1 cluster; run;
I hope this helps.
... View more