Hello.
I want to get a table as follows: (this is the proc means results)
however, when I used proc surveymeans, code are below
proc surveymeans data=nh.outcomes; STRATA sdmvstra; CLUSTER sdmvpsu; var BMXBMI; CLASS alpha16; WEIGHT glucwt4yr; domain eligible; run;
I only get the table like this:
could you please tell what went wrong?
Thank you!
I think the problem with the first code version is the BY statement. It requests a separate analysis for each value of alpha16. Try keeping the DOMAIN eligible statement but dropping the BY statement.
You will also need the MISSING option in the proc surveymeans statement, otherwise your eligible=2 domain will be ignored.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.