Bill Gould <[email protected]> explained to West Addison <[email protected]>
why matrix expressions such as
V["price","price"]
cannot be used in a scalar context. While I agree complete with Bill's
explanation (I think I am required to by contract), West might be interested
in a "back door" way of evaluating the expression on one line. Whereas the
matrix subscripting logic is geared toward efficiency, as Bill described, the
-rownumb()- and -columb()- functions are not so picky. West's original
example,
. generate sdif = dif / sqrt(V["price", "price"])
will not work. However,
. generate sdif = dif / sqrt(V[rownumb(V,"price"), colnumb(V,"price")])
will.
-- Vince
[email protected]
*
* 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/