[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
"Lane, Scott D" <Scott.D.Lane@uth.tmc.edu>
Tue, 19 Feb 2013 17:02:26 -0600
Regarding my earlier post [st: fsum labels with multi-level variable], I found the solution by doing some additional homework on the labels function. By adding the line [label values dose dose], I was able to get the dose names to display in fsum. Perhaps this can help someone out in the future. For those skilled in writing ado code, adding an option to export to a text file (as with tabout) would be a nice addition to fsum (which has a much better effort-to-flexibility ratio than tabout). One can always use translate @Results, but the formatting is not well maintained. Revised code:
label variable i_systolic "systolic BP"
label variable i_diastolic "diastolic BP"
label variable i_hr "heart rate"
label define dose 1 "placebo" 2 "150 mg caffeine" 3 "300 mg caffeine" 4 "450 mg caffeine"
label values dose dose /// <== added code here ///
by dose: fsum dose i_systolic i_diastolic i_hr, stats(mean se p25 p50 p75) format(%9.2f) uselabel
* For searches and help try: