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: creating variables using 'by' for subsets of records


From   John Westbury <[email protected]>
To   [email protected]
Subject   st: creating variables using 'by' for subsets of records
Date   Tue, 23 Feb 2010 13:55:25 -0600

Hello,

I have records for individuals by geographic region and wish to aggregate
the records for individuals to records for geographic regions.  I believe I
should create variables for those regions using 'by'.  Ex: by Region gen x =
argument for variable.  I am having difficulty with arguments for variable
x.  For example I wish to create a region variable that expresses a ratio of
count of indicator values for individuals in a region to a count of
individuals in the region and am unsure how to code this.

thanks

John

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index