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

From |
kokootchke <kokootchke@hotmail.com> |

To |
statalist <statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: AW: summarize variables without collapsing |

Date |
Mon, 13 Apr 2009 15:47:22 -0400 |

I think that what Martin suggests is correct but it doesn't save the results to a variable (unless he used the r() function, I guess)... and given that Brent is alluding to the collapse command, I guess he wants to save the results to some variable, is that right? If this is the case, you can perhaps do the following: bys state: egen mean_income = mean(income) Is this what you want? Best, Adrian > From: martin.weiss1@gmx.de > To: statalist@hsphsun2.harvard.edu > Subject: st: AW: summarize variables without collapsing > Date: Mon, 13 Apr 2009 21:31:37 +0200 > > > <> > > Easy answer: > > ************* > by state, sort : summarize income, detail > ************* > > Does that do what you want? If not, why not? > > > HTH > Martin > > > -----Ursprüngliche Nachricht----- > Von: owner-statalist@hsphsun2.harvard.edu > [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Brent Fulton > Gesendet: Montag, 13. April 2009 21:26 > An: statalist@hsphsun2.harvard.edu > Betreff: st: summarize variables without collapsing > > Dear Statalist, > > 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? > > Thanks, > Brent Fulton > UC Berkeley > > * > * 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/ > > > * > * 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/ _________________________________________________________________ Windows Live™: Keep your life in sync. http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009 * * 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/

**References**:**st: summarize variables without collapsing***From:*"Brent Fulton" <fultonb@berkeley.edu>

**st: AW: summarize variables without collapsing***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**st: RE: AW: summarize variables without collapsing** - Next by Date:
**st: AW: RE: AW: summarize variables without collapsing** - Previous by thread:
**st: AW: RE: AW: summarize variables without collapsing** - Next by thread:
**Re: st: AW: summarize variables without collapsing** - Index(es):

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