BookmarkSubscribeRSS Feed
Phil_NZ
Barite | Level 11

Hi everyone,

 

I am normally using STATA to run the regression, now after knowing the aesthetic of SAS, I changed to use the SAS EG.

Regarding running the regression with two-way fixed effects, we normally use PROC GLM as the sample below:

 

proc glm data=merge_sample;
    class type yr;
    model wtot_ass = fir_age wfirm_size pt type yr/solution ss3;
run;
quit;

But when I read the document from the link (https://support.sas.com/rnd/app/stat/procedures/glm.html), I did not see any guidance relating to two-way fixed effect.

And one more question, when I want to run the regression above without intercept, what should I adjust the code?

 

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.
2 REPLIES 2
PaigeMiller
Diamond | Level 26

@Phil_NZ wrote:

 

I am normally using STATA to run the regression, now after knowing the aesthetic of SAS, I changed to use the SAS EG.

Regarding running the regression with two-way fixed effects, we normally use PROC GLM as the sample below:

 

proc glm data=merge_sample;
    class type yr;
    model wtot_ass = fir_age wfirm_size pt type yr/solution ss3;
run;
quit;

But when I read the document from the link (https://support.sas.com/rnd/app/stat/procedures/glm.html), I did not see any guidance relating to two-way fixed effect.


Do you mean two-way interaction?

 

And one more question, when I want to run the regression above without intercept, what should I adjust the code?


Without strong justification based on the logic of the problem, running regressions without an intercept is a bad idea, and doesn't usually fit the data well. So, do you have such a strong justification?

 

A better link to PROC GLM documentation is: https://documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=statu...

--
Paige Miller
STAT_Kathleen
SAS Employee

If you are estimting two-way fixed model for cross section and time variable you can consider using either PROC PANEL in SAS/ETS or PROC GLM or PROC MIXED in SAS/STAT.  The following SAS Usage Note

 

http://support.sas.com/kb/22851

 

demonstrates the syntax for estimating fixed and random effects models using PROC PANEL and PROC MIXED. 

 

The NOINT option in the MODEL statement will suppress the intercept from the model.  For example,

      MODEL Y = x1 - x10 state year / noint solution;

 

The PROC MIXED procedure is documented in the ONLINE DOC under SAS/STAT User's Guide. You may access the PROC MIXED documention:

 

http://go.documentation.sas.com/?docsetId=statug&docsetTarget=statug_mixed_syntax.htm&docsetVersion=...

    

and the go to SAS/STAT--SAS/STAT User's Guide-- The Mixed Procedure. 

 

 

  

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!

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
  • 1075 views
  • 1 like
  • 3 in conversation