Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Using seg command to create indices


From   "Meryle Weinstein" <[email protected]>
To   <[email protected]>
Subject   st: Using seg command to create indices
Date   Sat, 22 Dec 2007 14:51:59 -0500

I have a data file with 626 observations of school zones.  I've created a
Herfindahl measure for each zone using the following code:

gen hhi_race= (pwhite^2 + pblack^2 + phisp^2 + pasian^2)/10000


I've been trying to create similar measures for each zone using the seg
command below:

seg pblack pwhite pasian phisp, by(zonebdsi) d g c generate(d dsrace g
ginirace c coefrace) file(c:\test.dta) replace

Instead of getting a measure for each zone, I get one value for all of the
observations.  Am I doing something wrong or do I misunderstand what "seg"
does?

Thanks for any help.  And Happy Holidays.


Meryle Weinstein
Associate Research Scientist
Institute for Education & Social Policy
New York University
82 Washington Square East, 7th floor
New York, NY 10003
(212) 998-5817
(212) 995-4564


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