BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
HEB1
Calcite | Level 5

hello

I run this code: 

proc hpmixed data= mydata;
class fyear two_digit_SICnum FIRMid;
model ROA_NI = post__treatment  log_ta fyear two_digit_SICnum FIRMid /solution;
run;
quit;

 

i want to add to this code clustered stanard error by FIRMid. how can I do it? 

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

On top of my previous reply ...

 

If you want to stick to PROC MIXED or PROC HPMIXED, then look at the below topics.
They both contain the solution for what you want to achieve.

 

proc mixed empirical;
  class firm;
  model y = x1 x2 x3 / solution;
  random int / subject=firm;
run;

Koen

View solution in original post

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

 

I believe you have panel data (time series cross-sectional data) , right?

  • fyear being the time identifier and
  • FIRMid defining the cross-sections

I would use PROC PANEL or PROC CPANEL (CAS-equivalent) to analyze your data. You are in the econometrics space here.

 

And here's how to do the cluster correction of standard errors :

Usage Note 67322: Heteroscedasticity and cluster correction of standard errors using the PANEL procedure
https://support.sas.com/kb/67/322.html

 

Koen

sbxkoenk
SAS Super FREQ

On top of my previous reply ...

 

If you want to stick to PROC MIXED or PROC HPMIXED, then look at the below topics.
They both contain the solution for what you want to achieve.

 

proc mixed empirical;
  class firm;
  model y = x1 x2 x3 / solution;
  random int / subject=firm;
run;

Koen

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 731 views
  • 1 like
  • 2 in conversation