I want to stack this type of my data set:
PATIENT_ID AA BB CC DD EE
1 22 33 44 55 66
2 77 88 99 10 11
... .. .. .. .. ..
into the following:
PATIENT_ID GROUP VALUE
1 AA 22
1 BB 33
1 CC 44
1 DD 55
1 EE 66
2 AA 77
2 BB 88
2 CC 99
2 DD 10
2 EE 11
... .. ..
to check normality for all groups as they are dependent/linked.
How to do this stacking in SAS ? Thank you.
As @itzy showed, proc transpose was created for these types of data restructuring tasks and is probably what you will want to use.
In the interest of completeness, I’ll show how you can achieve the same result with a more manual approach using just the data step.