Hello,
I'm trying to do the following data transformation but what I've tried (proc transpose, proc sql) hasn't worked.
This is current data in long format:
Patient Visit_Count Visit_Type
1 3 AV
1 2 IP
2 3 AV
2 1 TE
3 5 AV
What I want is 1 row per patient with the Visit_type as the name of the column, then the number of visits as the value of that column.
Patient AV IP TE
1 3 2 .
2 3 . 1
3 5 . .