[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: 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
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 trying
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 trucks
or SUVs, would have a higher focus measure. What I need is the frequency of
each class which will be different for each manufacturer.
My approach has been
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?
Thanks for the assist..SF
Univ of South Florida
* For searches and help try: