In SAS, I have a data set similar to the one below.
ID TRACT meanFA sdFA medianFA
1 t01 0.56 0.14 0.56
1 t02 0.53 0.07 0.52
1 t03 0.71 0.08 0.71
2 t01 0.72 0.09 0.72
2 t02 0.83 0.10 0.86
2 t03 0.59 0.10 0.62
I am not sure if transpose is the right concept here... but I would want the data to look like the one below.
ID t01_meanFA t01_sdFA t01_medianFA t02_meanFA t02_sdFA t02_medianFA t03_meanFA t03_sdFA t03_medianFA
1 0.56 0.14 0.56 0.53 0.07 0.52 0.71 0.08 0.71
2 0.72 0.09 0.72 0.83 0.10 0.86 0.59 0.10 0.62
proc transpose data=TRACT out=newTRACT;
var meanFA sdFA medianFA;
by id;
id tract meanFA sdFA medianFA;
run;
I have been playing around with the SAS code above, but with no success. Any ideas or suggestions would be great!