I was wondering whether there is a specific procedure in SAS which can handle binary correlated data. More specifically I have a sample of 400 individuals who have selected their food likes among a variety of available options (binary). Also the participants indicated their age, whether they are active or not and their gender. The food options were: pizza, salad, cheese cake and juices. I wanted to know whether there is a procedure in SAS which can explore the correlations between the food options among different demographics. I appreciate if you can help me with this (e.g. younger males who are active and like salad tend to like juices as well).
There are a couple of ways to approach this. One way would be using the FREQ procedure on Age vs Food Options and test for associations (or on Active or Gender vs Food Options, etc... whatever you would be interested in). There are some key words to use in the options to test for associations between class variables.
You could also just look visually by plotting the different Food Options vs the binary variables such as Age or Gender and determine if there is a change in any of the classes for any of the binary variables. Not an actual statistical test, but sometimes looking at plots visually will give you an idea of what could be significant and what to test for significance. Hope this helps and is what you were looking for. Good luck!
/*Tests of Association: Gender vs Food*/
proc freq data=input;
tables Gender*Food / expected chisq relrisk measures cl;
run;
Thanks a lot for your reply I was actually looking for a prediction model. So that based on these data I can develop a model that can predict what would be the preference of another sample based on their demographic data. Something like a multivariate logistic regression.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.