[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: Re: Tab and Matcell
> > I am having a problem implementing matrix operations within the 'tab'
> > command. Using a variation of the familiar car example, assume
> I have the
> > following dataset:
> > Manuf Model Class MPG
> > ford explorer SUV 12
> > ford expedition SUV 10
> > ford focus compact 34
> > dodge durango SUV 16
> > gm tahoe SUV 15
> > Assume I have hundreds of automobiles (cars, trucks, and SUVs). I am
> > to develop a focus measure (a Herfandahl index) that captures
> the focus of
> > the manufacturer. For example, GM (with all the GM lines)
> would probably
> > have a lower focus measure, while Volkswagon, which doesn't make any
> > or SUVs, would have a higher focus measure. What I need is the
> > each class which will be different for each manufacturer.
> > My approach has been
> > sort manuf
> > by manuf: tab class, matcell(classmat)
> > mat list classmat
> > Part 1 of my question: The resulting matrix is only for the
> last 'manuf'.
> > It will not allow "by:" Can I incorporate as part of a loop?
> > Part 2 of my question: I then need to access the variables and perform
> > calculations. Would it be possible to put all the results in
> one matrix?
The Herfindahl index can be calculated using -ineq-
from SSC and, very probably, using other programs
for inequality and similar analyses. -ineq- calls
it the Simpson index, reflecting ecologists' rather
than economists' tribal jargon.
* For searches and help try: