I am exporting the results from PROC SURVEYFREQ by ODS OUTPUT and clean my data for a report. I copied the example tables below. I have 2 questions please:
1- How may I merge the headings for the 95% CI in the ODS OUTPUT data?
2- Using ODS WORD to create the report, each table appears on a separate page. How may I make a continuous report without breaking the page after each table?
Thanks!
The output from PROC SURVEYFREQ:
Table of AGE_GROUP |
||||
AGE_GROUP |
Weighted |
Percent |
95% Confidence Limits |
|
10-15 years |
1260 |
50.9 |
48.3 |
53.5 |
16-20 years |
1216 |
49.1 |
46.5 |
51.7 |
Total |
2476 |
100.0 |
|
|
ODS OUTPUT sorted:
Age group |
Frequency |
Percent |
Lower_95_percent_CI |
Upper_95_percent_CI |
10-15 years |
1260 |
50.9 |
48.3 |
53.5 |
16-20 years |
1216 |
49.1 |
46.5 |
51.7 |
Thank you, Reeza. I will check the STARTPAGE option for page breaks.
I used PROC PRINT to print the data I saved with PROC OUTPUT. What is the advantage of PROC REPORT over PROC PRINT?
I keep your suggested example in mind for future use. For this project, I need to reorder the columns and eliminate the total row. So, I think this example does not work.
Thanks.
Thank you, Reeza. Yes, I am creating automated reports and based on your explanation it sounds PROC REPORT would be a better option for me. I will switch to PROC REPORT.
Thanks
Thanks for the resources, Reeza.
I tried STARTPAGE="NO" but my small tables are still on separate pages. I think that controls columns of a table not separate tables! Any suggestions? Maybe I am doing that wrong!
Thanks
Thanks, Reeza. Yes, you are right. I am not introducing the STARTPAGE option correctly. STARTPAGE=NO asks for quotations and STARTPAGE="NO" does not recognize the option.
ODS WORD FILE="C:\path\test.docx" options(STARTPAGE="NO");
Thanks
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.