I am wondering if it is possible to create unique labels in proc report for each column generated under an across variable. E.g., say I have the following data:
data report;
input ARM GRADE1 GRADE2 TOTAL N;
datalines;
1 0 1 1 2
1 1 0 1 2
2 1 2 3 3
2 1 1 2 3
2 0 1 1 3
;
run;
Here I have 2 arms, with the count of each grade and then the total. I have also included N, which is the number of patients per arm. I would like to use proc report
with ARM
as an across variable like this:
proc report data=report;
column ARM, (GRADE1 GRADE2 TOTAL);
define ARM / across;
run;
But, I would like to somehow make the Total columns appear as Total (N = 2)
and Total (N = 3)
under ARM=1/ARM=2 respectively. Is this possible? Or is there an easier way to set up my data so I can accomplish this?