Socks`` All American 11792 Posts user info edit post |
I am trying to run a simple regression in sas and the results seem to change depending on what order i put the variables in my model. Why?
For specifics, here is my code:
proc reg data=dataset; model lsalary = x1 x2 x3 x4 x5 x6 x7; run;
proc reg data=dataset; model lsalary = x3 x4 x5 x6 x7 x1 x2 ; run;
Why does the first code give different results from the second code? Does it matter if x1 and x2 are fitted values from a previous regression? 4/16/2009 2:38:42 AM |
evan All American 27701 Posts user info edit post |
does it give you the same results when you use proc glm instead? 4/16/2009 1:03:26 PM |
ScHpEnXeL Suspended 32613 Posts user info edit post |
because sas sucks?
jk jk 4/16/2009 1:04:32 PM |
evan All American 27701 Posts user info edit post |
them's fightin' words, son. 4/16/2009 1:07:01 PM |
ScHpEnXeL Suspended 32613 Posts user info edit post |
4/16/2009 1:13:40 PM |
philihp All American 8349 Posts user info edit post |
Have you tried support.sas.com? They should get you an answer within a few business hours. 4/17/2009 12:16:38 AM |
Scuba Steve All American 6931 Posts user info edit post |
I don't use SAS, but SPSS has something about block and stepwise entry. I can't remember offhand. 4/17/2009 1:19:56 AM |
evan All American 27701 Posts user info edit post |
^^lawl, or just that.
i forgot to ask around today at work - i'll do so tomorrow, someone in my building must be able to tell me the answer 4/17/2009 1:57:00 AM |
smoothcrim Universal Magnetic! 18966 Posts user info edit post |
I dunno about our building particular 4/18/2009 11:39:17 PM |
Perlith All American 7620 Posts user info edit post |
(Damn, it's been awhile since I took ST430 and ST435)
The order shouldn't matter in this case. Can you clarify how the results are different? http://www.tau.ac.il/cc/pages/docs/sas8/stat/chap55/sect24.htm
And you can feed in previous values, done frequently with Quality Control Statistics, where the current batch's quality may be affected by the previous batch's quality. Just make sure you state as such whenever detailing your methods / models. 4/19/2009 8:18:40 AM |
Colemania All American 1081 Posts user info edit post |
Sorry for the question, but, are you sure that youre reading your results correctly? If x1 is 'first' and your 'first' variable in the next equation are not the same, its because theyre listed in the order you put them in.
If not, and Im assuming its not. Try another method? use proc autoreg or something else? 4/19/2009 6:11:59 PM |