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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.