Have you checked out -ivreg2-? In all likelihood you are reinventing the wheel.
On 10/30/08, Sasha Shepotylo <[email protected]> wrote:
> Dear Statalist users,
>
> I programed calculation of HAC robust VC matrix in Mata and stored it
> as Stata matrix called A using the following Mata command:
>
> st_matrix("A", A).
>
> I would like to keep coefficients computed by ivreg command, replace
> the variance-covariance matrix computed by ivreg command with my
> matrix A, and output the result in a standard table with coefficients,
> standard errors, etc.
>
> Can you suggest how can I do that?
>
> Best,
>
> OS
> *
> * 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/
>
--
Stas Kolenikov, also found at http://stas.kolenikov.name
Small print: I use this email account for mailing lists only.
*
* 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/