Hi everyone. I am new-ish to using SAS and am hoping for some help on if my code is correct for what I am after. I have the following variables: Medications: the total number of medications taken per person Sex 1=male 2=female AgeGroups 1=20-25 2=26-29 3=30-34 Interaction between Sex and AgeGroups: AgeGroups*Sex Income 1=Less than 20k 2=20,000 – 49,999 3=50,000 – 79,999 4=80,000 – 99,999 5=100,000 or more I want to find out if any of the categorical demographic variables have a significant effect on the number of medications. Then I want to find out where the significant differences are between groups. I am using linear regression. After some Google searching, I have come up with the following code. Is it correct to get what I am looking for? Thanks. proc glm data=mydata; class Sex AgeGroups Income; model Medications=Sex AgeGroups Income AgeGroups*Sex /solution; lsmeans Sex AgeGroups Income AgeGroups*Sex /adjust=scheffe; run; quit;

... View more