Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[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   kirin_guess@yahoo.com.tw
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
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 <maartenlbuis@gmail.com>
To: statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index