- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Can you designate which statistics to output into a new dataset using PROC FREQ?
proc freq data=go_long ;
tables exam*htn / nocol nopercent out=htn_plot;
run;
The above syntax produces the correct table, which has counts and row percentages for each value of exam:
But the output dataset does not contain the row percentages, which is what I want (it looks like it contains total percent).
proc print data=htn_plot; where htn=1; run;
Is there a way I can specify which stats (i.e., counts and row percentages) to output using PROC FREQ?
Thanks.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add the OUTPCT option.
See the list of options in Table 9 in the documentation:
https://documentation.sas.com/doc/en/pgmsascdc/v_051/statug/statug_freq_syntax08.htm
@_maldini_ wrote:
Can you designate which statistics to output into a new dataset using PROC FREQ?
proc freq data=go_long ; tables exam*htn / nocol nopercent out=htn_plot; run;
The above syntax produces the correct table, which has counts and row percentages for each value of exam:
But the output dataset does not contain the row percentages, which is what I want (it looks like it contains total percent).
proc print data=htn_plot; where htn=1; run;
Is there a way I can specify which stats (i.e., counts and row percentages) to output using PROC FREQ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Add the OUTPCT option.
See the list of options in Table 9 in the documentation:
https://documentation.sas.com/doc/en/pgmsascdc/v_051/statug/statug_freq_syntax08.htm
@_maldini_ wrote:
Can you designate which statistics to output into a new dataset using PROC FREQ?
proc freq data=go_long ; tables exam*htn / nocol nopercent out=htn_plot; run;
The above syntax produces the correct table, which has counts and row percentages for each value of exam:
But the output dataset does not contain the row percentages, which is what I want (it looks like it contains total percent).
proc print data=htn_plot; where htn=1; run;
Is there a way I can specify which stats (i.e., counts and row percentages) to output using PROC FREQ?
Thanks.