Programming the statistical procedures from SAS

2 way Clustered SE by firm and year

Reply
Contributor
Posts: 24

2 way Clustered SE by firm and year

Hi 

 

I have a panel data , where I need to cluster the standard errors by firm and time. Peterson's website(http://www.kellogg.northwestern.edu/faculty/petersen/htm/papers/se/se_programming.htm) provides a macro. However I was wondering whether I can use Proc Surveyreg as shown below. I know for one level clustering this works but not sure about the two dimensional clustering. Can anyone please help me

 

proc surveyreg data= Have;
cluster Firm_ID  YEAR;
model Depedent_Var= Independent variables
/ADJRSQ;
;
ods output parameterestimates = estimates fitstatistics = rsquare datasummary = numberofobs;
run;

Ask a Question
Discussion stats
  • 0 replies
  • 193 views
  • 0 likes
  • 1 in conversation