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]
[no subject]
gsum calculates summary statistics for an ordinal variable were each
category represents a range of a conceptually continuous variable. gsum
provides the weighted N, the mean, the standard deviation, and quantiles
0.25, 0.50 (the median), and 0.75 (you can specify any set of quantiles you
want). Each quantile is available as both the midpoint of the category in
which the quantile falls, or as a linear interpolation of that quantile
based on methods presented by Blalock (1979).
gsum can also produce a value table (which can also be saved) listing each
category, the range, the midpoint of that range, the number of cases, the
weight of each case, and the cumulative distribution function (CDF).
For an extra tool, gsum can also create a new variable that contains the
midpoints.
gsum accepts any type of [weight] and is byable.
For example, you may have a variable age_cat where 1 represents 18-24 years
of age, 2 represents 25-44 years of age, and 3 represents 45-100 years of
age. You can use gsum to calculate summary statistics such as the mean,
median, and standard deviation.
-Eric
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/