Dummy variables proc genmod

noetsi

Fortran must die
#1
I have a series of dummy variables all of which are coded 0 and 1 and I have been unable to find in the documentation how SAS converts these into dummies. 1 in the original code means you are in a specific group (like Hispanic, 0 would mean non-Hispanic in this case). Does Genmod maintain that coding or does it reverse it (making a 1 a 0 and 0 a 1). These have all been declared CLASS variables. For example in the following does the defaults mean that (given the original coding noted above) that being 25 to 44 you are .2839 higher on average (the reverse of the sign shown which is for the 0 level).

1627480655371.png
 

hlsmith

Less is more. Stay pure. Stay poor.
#2
Just use the 'ref' option in the class statement and switch the ref group then don't do that and see how the results match up.
 

noetsi

Fortran must die
#3
I did (ref ="0") Which if I understand what you said means the reference level is now zero. So the slope shows the mean difference between being in level 1 (in the group in question) and the reference group.

The slopes reversed themselves so, as I guessed it was showing the mean difference between being in the reference group (0) and being in the group in question (1) before. I simply reversed the slopes myself in my analysis.

It seems strange to set the reference level in the default to 1 given the way data is usually coded in regression.
 

hlsmith

Less is more. Stay pure. Stay poor.
#4
I agree that a default reference group as the higher group in ascending order seems counter-intuitive. But it is good to always check.
 

noetsi

Fortran must die
#5
So from your knowledge of this hslmith (since you run proc genmod) is it correct to say when ref ="0" and the results are


1627503250611.png
Then what was coded 1 in the original dummy variable is 3014.736 higher (on average) than those coded 0 in the original data?

I ask this because it is really important and I have yet to find anything that says that even though I am sure it is true. :p
 

hlsmith

Less is more. Stay pure. Stay poor.
#6
Yup, that is how I would interpret it. So Intercept = estimated mean of ref (-4.3M) and if ref = 1 then that is the mean increase (3.0K) for being in that group.