Hello! I am trying to perform a one way ANOVA comparison of merged data. I have been able to merge the data, but I am having trouble with combining some variable data. I am wanting to look at the variable of age (RIDAGEYR) with the variable of days of physical activity per week (PAQ670) . For my project, I would like to group the days into 3 categories (1-2 days, 3-5 days, 6-7 days) and run a ANOVA test to get the mean age for each of the three categories. I have been able to run the ANOVA, but not able to separate the wanted categories. Here is my code and output-- data work. agephysicalhealth; merge SASFILE.DEMO_H SASFILE.PAQ_H; by SEQN; run; proc anova data=WORK.AGEPHYSICALHEALTH; class PAQ670; model RIDAGEYR = PAQ670; means PAQ670 / scheffe; title; run; The output lists the *class PAQ670 and values 1 2 3 4 5 6 7 99* I have not figured out how to separate these - not sure if I should sort the data prior to running the procedure or sort after. I would like to use the same code for all of my procedures because I am running multiple analysis on the variable of days of physical activity. Thank you for any help!! Carrie
... View more