I'm runing the code below to get Cochran-Armitage trend test output for each medical facility. Is there a way to get all test results outputted to a single table? The code below doesn't give me the trend test results.
proc freq data = PPIP_new ;
tables Tmt_ID_Name*PPH*CQ / trend out=trend_data;
title 'trend by MTF for each cq';
run ;
Thanks,
Using the ODS tables, as @Reeza has suggested, is always possible. In this specific case, however, I personally would prefer the OUTPUT statement:
proc freq data = PPIP_new;
tables Tmt_ID_Name*PPH*CQ / trend out=trend_data;
output out=catest trend;
title 'trend by MTF for each cq';
run;
(CATEST is just an arbitrary dataset name.)
I find the structure of this output dataset more convenient than that of the TrendTest ODS output dataset, which you could create as follows:
ods output TrendTest=tt;
proc freq data = PPIP_new;
tables Tmt_ID_Name*PPH*CQ / trend out=trend_data;
title 'trend by MTF for each cq';
run;
You will see, for example, that CATEST contains variable Tmt_ID_Name, whereas dataset TT (again an arbitrary name) does not.
Using the ODS tables, as @Reeza has suggested, is always possible. In this specific case, however, I personally would prefer the OUTPUT statement:
proc freq data = PPIP_new;
tables Tmt_ID_Name*PPH*CQ / trend out=trend_data;
output out=catest trend;
title 'trend by MTF for each cq';
run;
(CATEST is just an arbitrary dataset name.)
I find the structure of this output dataset more convenient than that of the TrendTest ODS output dataset, which you could create as follows:
ods output TrendTest=tt;
proc freq data = PPIP_new;
tables Tmt_ID_Name*PPH*CQ / trend out=trend_data;
title 'trend by MTF for each cq';
run;
You will see, for example, that CATEST contains variable Tmt_ID_Name, whereas dataset TT (again an arbitrary name) does not.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.