Bookmark and Share

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]

st: Conditional Variable means to new observation


From   Nickolas Lyell <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: Conditional Variable means to new observation
Date   Fri, 30 Aug 2013 09:05:21 -0400

Hi,

I am looking to take a conditional mean (or sum) of a variable and include it as a new observation.

For instance, I have data with several county indicators horizontally and county ids vertically.  I would like to take the mean growth rate (a variable) for only those counties that are Large (LgMdSm==2) and create a new observation that contains that value under the variable growth rate.

In other instances, I would like to take the sum.


I feel like this is probably a simple operation, but couldn't find any immediate help through a google search.

 Any help would be appreciated, thank you,
---
Nicholas Lyell
Research Associate
National Association of Counties | NACo
[email protected] | 202.661.8820



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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index