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

st: capture mean and std.dev. from the sum comand


From   "Justin G. Gardner" <[email protected]>
To   [email protected]
Subject   st: capture mean and std.dev. from the sum comand
Date   Fri, 26 Mar 2004 09:36:43 -0600

Hello stata listers

I have a panel data on 50 states and I would like to create a dummy variable for "flood" if the rainfall in a state exceeds its mean by more than one standard deviation.

I know there is a way to capture values from various commands.  My plan is to summarize by state and then capture the mean and standard deviation for each state.  Then generate the dummy variable.  The problem is I have yet to find the code to do this.  I have seen this done for other commands, you can for example capture the beta hat vector when you use the regress command.  Can somebody point me to an online resource?

Thanks for the help.
Justin G. Gardner
Department of Agriculture and Consumer Economics
University of Illinois at Urbana-Champaign
*
*   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