- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.