Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Update fsum program


From   Fred Wolfe <[email protected]>
To   [email protected]
Subject   st: Update fsum program
Date   Wed, 23 Feb 2005 08:29:22 -0600

Thanks to Kit Baum, an updated version (v 2.2.0)of -fsum- is now available.

The major changes to -fsum- have been to display the "sum" of "percent" variables; to default the format of the sum to %n.0f, with an option to use decimal format if desired; and to use Stata 8.2 code, making it faster.

The package does not include the tlabel utilities that were in the 2002 release of the package, as I found I never used them. Instead, I used a -mktlabel.ado program and modify it as needed.

Such a program looks like:

program define mktlabel
version 8.2
discard
capture char age[tlabel] "Age (years)"
capture char ahi[tlabel] "Helplessness (5-25)"
capture char ansaid[tlabel] "Flurbiprofen (%)"
capture char antacids [tlabel] "Antacids (%)"
capture char anxiety[tlabel] "Anxiety (0-10)"
capture char arava[tlabel] "Leflunomide (%)"
capture char arava_pat[tlabel] "Arava study observation (%)"
<snip>
end

With a text editor macro, entry of "capture char [tlabel] " is simple. The mktlabel program works in the same way as a list of var labels except that they are char labels.

fsum is a general purpose summary statistic program. Its display can be formatted with appropriate labels and variable formats so that its output can be pasted into a word processor without the need for further alterations within the word processor.

fsum provides summary statistics, including N, # missing, percent missing, mean, variance, standard deviation, standard error, P1, P5, P25, median, P75, P95, P99, minimum, maximum, confidence intervals, sum, and percent for 0/1 variables. It can also display categories of a variable in a manner similar to tabulate. fsum allows Stata labels and special user-defined labels. Display width is automatically adjusted for variable and label length. Column width is adjustable by format, and variable labels are available optionally.

Fred Wolfe






Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761
[email protected]


*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index