I am working on outputting a dataset that has been a cumbersome aggregation of individual data points and proc frequency outputs from more than a dozen datasets. I have almost a final table and I am stuck on one last piece to code and I can't seem to get it right.
My current data set looks like this (example data below). This table is a bit complicated as each cell value is a data point created by concatenating other variables.
*Note: the total number of subjects is 20 because we carry over the same subjects from year 1 to 2 so we only want to report unique subjects.
The cell listed below as "Currently Empty" is where I am having an issue. I have a separate dataset with only one value in it: "19 (21) 95%". I want that value to appear in the cell.
Any suggestions on how I can get this done without having to go back and recreate a lot of my other datasets that feed into this table?
Thanks!!
Year 1 Number of Subjects (Number of Occurences per subject) Year 2 Number of Subjects (Number of Occurences per subject) total
Category | n= 20 | n= 10 | Overall Total = 20 (unique subjects) |
group 1 | 10 (11) 50% | 5 (5) 50% | 15 (16) 75% |
group 2 | 2 (2) 10% | 2 (3) 20% | 4 (5) 20% |
Total | 12 (13) 60% | 7 (8) 70% | CURRENTLY EMPTY |