BookmarkSubscribeRSS Feed
therock
Calcite | Level 5

Hi Everyone,

I am trying to replicate the following statement:

“All specifications include year and industry fixed effects and standard errors are heteroskedasticity robust, clustered at the firm level.” (Costello, 2013). My problem is I am getting three difference coefficients on the model. I need to which option is correct.

 

I have three option:

 

1) proc surveyreg data=sample ;
cluster firm;
class industry year;
model DV = IND1*IND2 IND3 IND4 / noint adjrsq solution;
run;

 

2) proc glm data=sample ;
absorb industry;
class year;
model DV = IND1*IND2 IND3 IND4 year / noint solution;
run;

 

(Could not find a way to do clustering in Proc GLM)

 

3) proc mixed noclprint data=sample;
class firm industry year;
model DV = IND1*IND2 IND3 IND4 industry year / noint solution;
random intercept/subject=firm;
run;

(Could not get R-square in Proc Mixed)

 

Any help or insight will be very much appreciated. Thank you in advance. 

3 REPLIES 3
PaigeMiller
Diamond | Level 26

“All specifications include year and industry fixed effects and standard errors are heteroskedasticity robust, clustered at the firm level.”

That's really not enough to go on. Perhaps if I read the entire paper, I could advise further, but I'm not going to read the entire paper.

 

Nevertheless, if there is clustering at the firm level, this would suggest using PROC SURVEYREG. I note that you did not put year and industry into the model — putting them in the CLASS statement but not in the MODEL statement really doesn't do anything.

--
Paige Miller
therock
Calcite | Level 5

That is what almost all paper mentioned in the Finance field. 

 

By putting the Class variables in model statement, SAS tells me that: The X’X matrix has been found to be singular. Essentially one or more of my independent variables are the exact same. If I do not include the class variables in the model statement, it works just fine.

PaigeMiller
Diamond | Level 26

@therock wrote:

 

By putting the Class variables in model statement, SAS tells me that: The X’X matrix has been found to be singular.


This always happens when you have CLASS variables. It does not indicate you did anything wrong. It does not indicate a problem with the analysis, which (if everything is done correctly) is the correct analysis. Everyone who has ever used CLASS variables in a SAS model with the SOLUTION option has gotten this message.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 718 views
  • 0 likes
  • 2 in conversation