| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: re: matrix question- square roots of matrix elements
In my posting last night illustrating how Stata's matrix language,
Mata, could be used for elementary regression calculations, I did not
add the warning that the textbook methodology is not the best way to
skin that cat, and is not used by Stata itself when it runs a
regression. Far better methods involving solving the linear system
(X'X)b = X'y exist from the standpoint of numerical analysis, and
Rich Gates shows how they may be employed to calculate everything
that I did. There are some useful comments in one of Bill Gould's
"Mata mattahs" columns in the Stata Journal on the subject (imagine
if Bill spoke with a Boston accent!) as well.
Neverheless, most social science and business students may not be
familiar with LU, QR and Singular Value decompositions (even if they
should if they want to write their own efficient and numerically
stable code). It is feasible to write a Mata routine that cranks out
the textbook formulas using well-known concepts from linear algebra,
and as long as you're not trying to write production code, that's
good enough.
Kit
Kit Baum, Boston College Economics
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* 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/