Help!! The dataset I am working with looks like this (partial, but you get the idea): Obs grouporder groupname Testcode Testname _VAR_ _NOBS_ _MEAN_ _STD_ _PROBS_ runv 1 1 Motor Skills 2 UHDRS Baseline 7 32.8571 6.2029 0.01563 1 2 1 Motor Skills 2 UHDRS _12_months 7 29.7143 7.5435 0.01563 1 3 1 Motor Skills 2 UHDRS change 7 -3.1429 9.0633 0.29688 1 4 1 Motor Skills 2 UHDRS preslope 7 5.5867 5.1828 0.04688 1 5 1 Motor Skills 2 UHDRS postslpe 7 1.7346 8.7497 0.57813 1 6 1 Motor Skills 2 UHDRS slopedif 7 -3.8520 12.1819 0.37500 1 7 1 Motor Skills 3 CHOREA Baseline 7 11.8571 3.7607 0.01563 1 8 1 Motor Skills 3 CHOREA _12_months 7 10.1429 1.8645 0.01563 1 9 1 Motor Skills 3 CHOREA change 7 -1.7143 2.3604 0.15625 1 10 1 Motor Skills 3 CHOREA preslope 7 1.2026 1.8614 0.15625 1 11 1 Motor Skills 3 CHOREA postslpe 7 -0.5874 2.2477 0.57813 1 12 1 Motor Skills 3 CHOREA slopedif 7 -1.7900 3.4145 0.37500 1 . . . Using file print and put, I need to get it to look like this: System Baseline Month 12 Change Mean (STD) Mean (STD) p-value Motor Skills UHDRS 32.9 (6.2) 29.7 (7.5) 0.297 CHOREA 11.9 (3.8) 10.1 (1.9) 0.156 GAIT 1.3 (0.5) 1.3 (0.8) 1.000 TANDEM 1.9 (1.1) 1.6 (1.4) 0.750 PULL 0.1 (0.4) 0.7 (0.8) 0.125 BALANCE TOTAL 3.3 (1.4) 3.6 (2.6) 1.000 Physical Function TFC 6.6 (1.0) 7.0 (2.2) 0.625 FA 20.3 (2.2) 19.1 (3.2) 0.313 IS 77.1 (8.6) 71.4 (7.5) 0.281 Cognigtive impair COWA 27.2 (8.2) 31.5 (13.9) 0.188 SYMBAL DIGIT 25.1 (5.1) 20.1 (7.2) 0.094 STROOP 1 45.9 (13.6) 38.3 (17.1) 0.047 STROOP 2 61.7 (19.4) 52.3 (22.5) 0.031 STROOP 3 29.4 (9.6) 28.1 (10.4) 0.406 MMSE 27.5 (2.5) 26.8 (2.6) 0.625 The problem I have is getting to data in the file print. This is the code I have so far: data _null_; set allb; by grouporder groupname testcode testname _var_ notsorted; options nodate nonumber; file print notitles; if _n_=1 then do; put @1 'System'; put / @20 'Baseline' @40 'Month 12' @60 'Change' ; put @20 'Mean (STD)' @40 'Mean (STD)' @60 'p-value'; end; if first.groupname then put // groupname @; if first.testname then put / testname @; run; Which gives me: System Baseline Month 12 Change Mean (STD) Mean (STD) p-value Motor Skills UHDRS CHOREA GAIT TANDEM PULL BALANCE TOTAL Physical Function TFC FA IS Cognigtive impair COWA SYMBAL DIGIT STROOP 1 STROOP 2 STROOP 3 MMSE Any help is much appreciated! The code must be file print with put statements!!
... View more