Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Guidance on matrix inversion for OLS in mata


From   Thomas Jacobs <[email protected]>
To   StataList <[email protected]>
Subject   st: Guidance on matrix inversion for OLS in mata
Date   Mon, 26 Apr 2010 23:45:07 -0500

Hi,

I am trying to perform a lengthy series of simulations to examine some
event study methodologies.  I have moved to mata for the bulk of the
work but find that for those cases where I wish to use a market model
approach requiring an OLS regression to establish abnormal returns I
am unable to generate an inverse for x'x in seeking to solve for beta
hat.  I am typically working with vectors that have 1. missing values,
2. zero values, and 3. very small values close to zero (within a
couple of decimal places such as -.01 or .005).  I have tried mata's
cholinv, invsym, pinv, luinv, and qrinv (I realize that some of these
are probably inappropriate for my problem but I am no expert) and
generally get an inverse matrix of missing values or bizarre results
like a single populated row.

I would prefer not to go back and forth between stata and mata to use
the stata regress function unless that is the only way to accomplish
this effort.

Can anyone offer general guidance on how to proceed here?  Thanks.

Tom

--
Thomas Jacobs
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index