Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: summarize variables without collapsing


From   Christopher Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: summarize variables without collapsing
Date   Tue, 14 Apr 2009 15:40:32 -0400

<>
webuse grunfeld,clear
tabstat invest mvalue kstock,stat(mean sd min max) save
mat li r(StatTotal)

Kit Baum   |   Boston College Economics and DIW Berlin   |   http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming   |   http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata   |   http://www.stata-press.com/books/imeus.html

On Apr 14, 2009, at 2:33 AM, statalist-digest wrote:

I am using Stata 9.2 and have a dataset with 10,000 individuals who each
reside in one of 50 states. I have individual-level (e.g., race) and
state-level variables (e.g., a state's average income).

Is there a way to summarize the average income (calculate mean, min, max,
sd, etc.) for the 50 states without collapsing the data by state?

*
*   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/



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