proc freq data=rawdata noprint;
table year_cat * A--P / trend norow nocol nopercent out=Output_of_trend;
run;
Dear all,
I have a code as written above. I would like to produce the count result of all the variables from A to P such that it all gets to store in output year_cat dataset. Is there any direct ODS option or any other method in sas to avail that.
under year-cat column i have multiple year categories like (2010-2012), (2013-2014), (2015-2018), (2019-2020)...... and multiple columns like A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P . So i have used A--P. But when i run the code it only captures results produced from year_cat*P in my output dataset where as in the result window it captures for all the variables from A to P.
Kindly share if any one knows any shortcut way by ODS or any other options
Hello @sahoositaram555,
The ODS output datasets will contain the information from all tables year_cat * A, ..., year_cat * P.
ods select none;
ods output crosstabfreqs=freqs(drop=_table_ percent rowpercent colpercent)
trendtest=trendtests;
proc freq data=rawdata;
table year_cat * A--P / trend;
run;
ods select all;
Hello @sahoositaram555,
The ODS output datasets will contain the information from all tables year_cat * A, ..., year_cat * P.
ods select none;
ods output crosstabfreqs=freqs(drop=_table_ percent rowpercent colpercent)
trendtest=trendtests;
proc freq data=rawdata;
table year_cat * A--P / trend;
run;
ods select all;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.