BookmarkSubscribeRSS Feed
HEB1
Calcite | Level 5

Hi

I run the following code ,

with fixed effects of ID year and industry:

 

proc glm data=library.modify1;
class two_digit_SICnum gvkey fyear;
model roa =dummy two_digit_SICnum gvkey fyear/solution ;
run;
quit;

 

however, the program does not provide estimates and my memsize is set to 4!

 

 

Thank you

5 REPLIES 5
PaigeMiller
Diamond | Level 26

Please show us the output so we can see what you are seeing. Please use the "Insert Photos" icon to include a screen capture of your output in your reply; do NOT attach files.

Capture.PNG

 

--
Paige Miller
HEB1
Calcite | Level 5
I can’t even produce the output now, the program get stack.
Basically what I want to run is dependent variable on a dummy and fixed effects.
The dummy equals 1 for almost 2,000 obs and equals 0 for 75,000 obs.
I think that problem starts when I use ID fixed effects. I have approximately 20,000 distinct ID.
Any idea how can I run this analysis?
PaigeMiller
Diamond | Level 26

No need to create dummy variables for PROC GLM. Use the CLASS statement instead of dummy variables.

 

Running with 20,000 distinct ID seems like it will cause memory related problems and may fail. Why do you need to have 20,000 distinct IDs in your model?

--
Paige Miller
ballardw
Super User

You say that you have about 2,000 observations where your dummy equals 1 and 20,000 ids. That tells me that you have about 18,000 (possibly more) IDs that all the values are 0. So there is no variability for those ids unless there is a lot more going on in your code than you have provided. No variability, no error typically means no "estimate".

At best, 18,000 of those IDs are not going to have any prediction for the value=1 because they never see one.

 

As an absolute minimum you should share the code you are attempting and the LOG with the code and any messages.

 

jiltao
SAS Super FREQ

You might consider using PROC MIXED and treating ID as a random effect.

If you must treat ID as a fixed effect, you might consider using the ABSORB ID; statement in PROC GLM and take ID out of the MODEL statement. Make sure your data is sorted by ID. More information on the ABSORB statement can be found in the documentation  -

https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_glm_syntax02.htm

Thanks,

Jill

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 506 views
  • 3 likes
  • 4 in conversation