I want to save percentages by gender and province. This program only saves the frequencies and total percentages across all provinces. Any suggestions?
proc freq data=j1 ;
tables province*gender / out=Freq_gender list;
run;
Have:
Cumulative Cumulative
province Gender Frequency Percent Frequency Percent
-------------------------------------------------------------------------------------------
Aga 1 546 3.21 546 3.21
Aga 2 394 2.31 940 5.52
Want:
province Gender Frequency Row Percent
-------------------------------------------------------------
Aga 1 546 58.09
Aga 2 394 41.91
If you add the OUTPCT option to the TABLES statement, then that should give you what you need.
If you add the OUTPCT option to the TABLES statement, then that should give you what you need.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.