04-30-2015 03:13 AM
I am trying to obtain the means and variances of grip-strength across time by group and Plot the group means across time.
The data order is ID, Group(0=placebo and 1= treatment), Time (0-3), Grip Strength, Status (0= no pain and 1 = pain)
The data I have is long data, and I plot the means across time by group before with following SAS code
PROC SUMMARY NWAY DATA=Final.exam;
CLASS GROUP; VAR measu1 measu2 measu3 measu4;
OUTPUT OUT=heart.B MEAN = ameasu1 ameasu2 ameasu3 ameasu4;
ARRAY ameasu(4) ameasu1 ameasu2 ameasu3 ameasu4;
DO TIME = 1 TO 4;
MEANMEASU = ameasu(TIME);
DROP ameasu1 ameasu2 ameasu3 ameasu4;
FORMAT Group Group.;
So should I change long data to wide data and run the above code?