Hi
I am a newbie to SAS so please bear with me.
I am trying to replicate some results from regressions that I have, these were supposedly run in SAS but thats not for sure. I used the SAS code to run the model and got ALL standard deviations and all but one coefficients corrrect in the proc reg command.
The coefficient that is incorrect would be correct if I do 1-beta_1.
I suspect the reason is because of how SAS runs regressions is different in some way and I would like someone's help in transforming the reg input so get the same out as I have from outside. I need this because of many other regressions and because I need ot run ridge regressions which are producing very different results.
Here is the code, the SAS output and the desired output:
proc reg data=Data
outest=b ridge=0 to 5 by 0.5;
StartingDate1950: model y_Log = y_Log_Ch_Lag12 xYoY_Lag12 z_Ch_Lag12 xYoY_Ch_Lag12 y_Log_Lag12;
weight Sqrtx;
where 195001<=Eom<=200512 and CountryID^=100;
run;
proc print data=b;
run;
SAS Output
-0.53073 | 0.01686 | -31.49 | <.0001 |
3.63783 | 0.11334 | 32.10 | <.0001 |
4.43167 | 0.24145 | 18.35 | <.0001 |
-1.35277 | 0.09557 | -14.15 | <.0001 |
-0.19969 | 0.01158 | -17.24 | <.0001 |
0.84583 | 0.00621 | 136.29 | <.0001 |
Desired output
Intercept | -0.53073 | 0.016855 | ||
y_Log_Lag12 | -0.15417 | 0.006206 | ||
xYoY_Lag12 | 3.637828 | 0.113342 | ||
z_Ch_Lag12 | 4.431668 | 0.241454 | ||
xYoY_Ch_Lag12 | -1.35277 | 0.095572 | ||
y_Log_Ch_Lag12 | -0.19969 | 0.011581 |
Thanks!!
Sorry, I should have said, the original regression output data has intercepts that I can match to mine as well.
So they have intercepts
Is the one coefficient that's wrong an indicator variable, ie 0/1?
Any chance that the original analysis was run with the NOINT option on the MODEL statement?
Well, I am not sure what the exact code was so its possible.
But
when i run with noint now, it gives a completely different set of coefficient estimates.
Maybe Im not understanding what youre saying...
Sorry, I should have said, the original regression output data has intercepts that I can match to mine as well.
So they have intercepts
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.