BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Phil_NZ
Barite | Level 11

Hi all,

I want to ask how to control firm and industry*year fixed effects in proc glm?

My regression when regressing controlling for firm and year fixed effect is as below:

proc glm data=merge_treat_con_6th_may;
    ABSORB TYPE;
    class yr / truncate;
    model y= x1 x2 x3 yr/solution ss3;
run;
quit;

While TYPE and yr are firms and years accordingly.

Now I want to control for firm and industry*year fixed effect while INDC3 is industry indicator and character variable. Could you please let me know how to adjust the code above to do so?

 

Thank you and warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

"Each level of TYPE" ... the variable TYPE has a certain number of discrete of values, that number is the number of levels — for example, a much smaller data that I have just made up contains values of variable TYPE equal to "Eastman Kodak","ON Semiconductor" or "TrueSense Imaging", that's 3 levels.


If each TYPE can be in only one INDC3, then TYPE is nested within INDC3.

 

So if you want INDUSTRY*YEAR in the model, I think you have to not use the ABSORB statement. Using the ABSORB statement, I don't think it can be done.

--
Paige Miller

View solution in original post

7 REPLIES 7
PaigeMiller
Diamond | Level 26

If INDC3 is an industry indicate and TYPE is the firm name, is TYPE nested underneath INDC3? Is there only a single INDC3 for each level of type? Is there is ever a value of TYPE that can be in two INDEC3 levels?

--
Paige Miller
Phil_NZ
Barite | Level 11

Hi @PaigeMiller 

Thank you for your question helping me to clarify my concern

I hope that you can explain me more about this part" is TYPE nested underneath INDC3". 

Is there only a single INDC3 for each level of type? ->  what do you mean by "each level of type then"?

Is there is ever a value of TYPE that can be in two INDC3 levels? ->No

Thank you and warm regards

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
PaigeMiller
Diamond | Level 26

"Each level of TYPE" ... the variable TYPE has a certain number of discrete of values, that number is the number of levels — for example, a much smaller data that I have just made up contains values of variable TYPE equal to "Eastman Kodak","ON Semiconductor" or "TrueSense Imaging", that's 3 levels.


If each TYPE can be in only one INDC3, then TYPE is nested within INDC3.

 

So if you want INDUSTRY*YEAR in the model, I think you have to not use the ABSORB statement. Using the ABSORB statement, I don't think it can be done.

--
Paige Miller
Phil_NZ
Barite | Level 11

@PaigeMiller  I need to use ABSORB because I need to deal with the limitation of distinct observation (>32k something). So, you mean, no hope for that so far by using SAS?

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.
PaigeMiller
Diamond | Level 26

Not that I know of. But that certainly shouldn't stop you from experimenting to see if it can be done.

 

Again, I state my skepticism that >32K levels of a variable are really useful in modeling.

--
Paige Miller
Phil_NZ
Barite | Level 11

Hi @PaigeMiller ,

Thank you for your help, but could you please explain this phrase to me , please?

" I state my skepticism that >32K levels of a variable are really useful in modeling"

Do you mean I may check again the number of distinct observations?

 

Warm regards.

Thank you for your help, have a fabulous and productive day! I am a novice today, but someday when I accumulate enough knowledge, I can help others in my capacity.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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
  • 7 replies
  • 814 views
  • 4 likes
  • 2 in conversation