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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: