Hi Colleagues,
I have a data set like this.
data food;
input id sex status wt;
cards;
1 1 1 33
2 2 1 33
3 1 2 33
4 2 2 10
5 1 1 10
6 1 2 10
7 1 2 33
8 2 2 10
;
run;
/*Id = id*/
/*Sex = sex of respondent (1=male, 2= female)*/
/*Status = food security status (1=secure, 2=insecure)*/
/*Wt = weight variable*/
Using proc surveyfreq, I have generated the cross tabs for the
population.
proc surveyfreq data=food;
tables sex*status;
weight wt;
run;
Finally however my report has to present the frequency counts and associated percentages for the following combinations:
Sex 1 & Status 1
Sex 1 & Status 2
Sex 2 & Status 1
Sex 2 & Status 2
SAS output presents the frequency counts and associated percentages differently. So, I am manually calculating the percentages for the above combinations using the freq counts generated by SAS output.
Query: Would there be any optional statements in the proc surveyfreq that would straight a way generate the percentages of my interest.
Thank you for the inputs.
Neil