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]

Re: st: How to save a hessian matrix for post-estimation analysis?


From   [email protected]
To   "[email protected]" <[email protected]>
Subject   Re: st: How to save a hessian matrix for post-estimation analysis?
Date   Fri, 24 Aug 2012 02:27:16 +0800 (CST)

Dear Maarten, 
 
Thanks for your replay, but I will not worry about the hessian and the variance-covariance matrix, when using the factor variable notation, because Stata computes the hessian with excluding the baseline variables. 
 
Moreover, although the e(V) contains the elements of the baseline variables, we can still recover the original hessian by using invsym(e(V)). This is because the baseline variables were excluded when Stata computed the hessian. Therefore, it doesn’t matter whether the baseline variables are not in the e(V) or they are in the e(V) with elements set to zero.
 
Here is an example, 
 
webuse lbw, clear
logit low i.race, hessian  //The hessian doesn’t contain 1b.race
matlist e(V)               //The e(V) contains 1b.race with elements set to zero
matlist-1*invsym(e(V))     //Recover the original hessian through e(V)
 
 
Best Regards,
 
Chi-lin Tsai





------------------------------------------------------------------
----- Original Message -----
From: Maarten Buis <[email protected]>
To: [email protected]
Cc: 
Sent: Thursday, 23 August 2012, 19:27
Subject: Re: st: How to save a hessian matrix for post-estimation analysis?

On Thu, Aug 23, 2012 at 12:19 PM, Gordon Hughes wrote:
> I think that
> the best advice is to try and remove the source of the degeneracy - i.e.
> remove collinear variables or whatever.  If there is some reason why this
> can't be done (I can't think of an obvious example),

It is obviously good advise to solve the problem at its source rather
than try to fix it afterwards. One example where this may be hard but
also unproblematic, is when you use Stata's factor variable notation
it will include the baseline value but sets its rows and columns in
the variance covariance matrix to 0.

-- Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl/
---------------------------------
*
*  For searches and help try:
*  http://www.stata.com/help.cgi?searchhttp://www.stata.com/support/statalist/faqhttp://www.ats.ucla.edu/stat/stata/


*
*   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