Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# st: -trimmean- and -trimplot- available on SSC

 From Nick Cox To statalist@hsphsun2.harvard.edu Subject st: -trimmean- and -trimplot- available on SSC Date Fri, 1 Feb 2013 02:11:44 +0000

```Thanks as usual to Kit Baum, new packages -trimmean- and
plotting of trimmed means. They may appeal to those who want to mix
their modelling with good old-fashioned data analysis.

Every good introduction to statistics explains that you should
work with means, unless a careful look at your distribution
underlines that to be a bad idea, in which case perhaps medians
are better. What few introductions or even more advanced accounts
emphasise is that means and medians are limiting cases of the
family of trimmed means, so a more unified and nuanced view is
possible.

In a current problem I am working with some fairly symmetric
distributions but with outliers in either tail, so needed a
systematic way to summarize the data with and without outliers.

Each package contains a program of the same name, but despite
similar-sounding aims they are quite separate programs.

-trimmean- is for calculating trimmed means as descriptive
statistics. The recipe is to set aside some fraction of the lowest
order statistics and the same fraction of the highest order
statistics and then to calculate the mean of what remains, thus
providing some protection against possible stretched tails or
outliers in a sample. The user specifies percents of trimming for
one or more trimmed means. This command is dedicated to
numeric results and its logic is that you say what percent you want
and you will get a trimmed mean.

-trimplot produces plots of trimmed means versus depth for one or
more numeric variables. Such plots may help specifically in
choosing or assessing measures of level and generally in assessing
the symmetry or skewness of distributions. They can be used to
compare distributions or to assess whether transformations are
necessary or effective. It will often be a good idea to look at such
a graph first.

Stata 8.2 is required in each case, but following my personal
policy as outlined at

<http://hsphsun3.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.1208/date/article-918.html>

help files are supplied as .sthlp files, so any Stata 8 or 9 users
would need to convert those to .hlp files.
*
*   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/
```