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

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

Parameter Estimates Variable DF Parameter
Estimate Standard
Error t Value Pr > |t| Intercept 1 xYoY_Lag12 1 z_Ch_Lag12 1 xYoY_Ch_Lag12 1 y_Log_Ch_Lag12 1 y_Log_Lag12 1
-0.530730.01686-31.49<.0001
3.637830.1133432.10<.0001
4.431670.2414518.35<.0001
-1.352770.09557-14.15<.0001
-0.199690.01158-17.24<.0001
0.845830.00621136.29<.0001

 

 

 

Desired output

 

Intercept -0.530730.016855 
y_Log_Lag12 -0.154170.006206 
xYoY_Lag12 3.6378280.113342 
z_Ch_Lag12 4.4316680.241454 
xYoY_Ch_Lag12 -1.352770.095572 
y_Log_Ch_Lag12 -0.199690.011581 

 

Thanks!!

1 ACCEPTED SOLUTION

Accepted Solutions
jb1983
Obsidian | Level 7

Sorry, I should have said, the original regression output data has intercepts that I can match to mine as well.

So they have intercepts

View solution in original post

5 REPLIES 5
Reeza
Super User

Is the one coefficient that's wrong an indicator variable, ie 0/1?

jb1983
Obsidian | Level 7
No, it is a time series
Rick_SAS
SAS Super FREQ

Any chance that the original analysis was run with the NOINT option on the MODEL statement?

jb1983
Obsidian | Level 7

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...

jb1983
Obsidian | Level 7

Sorry, I should have said, the original regression output data has intercepts that I can match to mine as well.

So they have intercepts

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1440 views
  • 0 likes
  • 3 in conversation