Thanks, RW9! To be clearer: My input dataset for the DATA step is a proc tabulate output dataset in the following form: Obs estabgroup N fns_Mean fns_Std 1 amp 46306 . . . 2 hih 39270 . . . 3 nur 11606 . . . 4 sst 4840 . . . 5 102022 . . . 6 amp . 40.8703 . 40.8703 7 hih . 44.0349 . 44.0349 8 nur . 82.7968 . 82.7968 9 sst . 82.7768 . 82.7768 10 . 48.5631 . . 11 amp . . 49.3312 . 12 hih . . 51.7005 . 13 nur . . 64.1790 . 14 sst . . 68.1879 . 15 . . 55.0111 . Problem-solve1: In the data step below I'm trying to create an analysis variable called estabgroup_&level._fns for each level/valid value of estabgroup (i.e. amp, hih, nur, and sst) which is the concatenation of the mean and std(for standard deviation) variable. Problem-solve2: After creating the mean/std analysis variable for each of the four levels of estabgroup (estabgroup_amp_fns, estabgroup_hih_fns, estabgroup_nur_fns, estabgroup_sst_fns,), I want to create mean/std variables at each of the four levels of estabgroup for n number of covariates. Right now, I haven't introduced that I'll have n number of covariates; I've just let the macro variable covar=fns, the first covariate. But currently my code (previous post) produces the following output, where mean and standard deviation aren't concatenated properly. Problem-solve3: How would I create the mean/std concatenated variable so that it displays as follows: for each level of estabgroup, estab_amp/sst/nur/hih_fns=fns mean where level=amp/sst/nur/hih (fns std where level=amp/sst/nur/hih)? Ideas? Many thanks for your time and help in advance
... View more