Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: fsum labels with multi-level variable
From
"Lane, Scott D" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: fsum labels with multi-level variable
Date
Tue, 19 Feb 2013 16:26:13 -0600
I have the following fsum code, which looks OK in the output, except that dose remains listed by number (1-4, as entered in the data) rather than by label (which is my intention). I have scanned all the fsum documentation and the list serve FAQ to no avail. Here is the code, any help would be appreciated.
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"
sort dose
by dose: fsum dose i_systolic i_diastolic i_hr, stats(mean se p25 p50 p75) format(%9.2f) uselabel
I think I understand that this does not work because the [by dose] call should come after the [fsum] call, but it's not clear how to get fsum to list by dose otherwise…
Regards,
Scott Lane
UTHSC-Houston
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/