BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jason2020
Obsidian | Level 7

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
2 REPLIES 2
SAS_Rob
SAS Employee

If you add the OUTPCT option to the TABLES statement, then that should give you what you need.

https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=statug&docsetTarget=st... 

Jason2020
Obsidian | Level 7
Thank you very much.
I thought I read the documentation carefully, but obviously I did not.
Thanks again.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 3177 views
  • 6 likes
  • 2 in conversation