Statalist


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

AW: Ang. st: AW: var-covar matrix from logistic regression


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   AW: Ang. st: AW: var-covar matrix from logistic regression
Date   Wed, 25 Feb 2009 17:21:50 +0100

<> 

Well, you can, simply by  

*************
webuse lbw2, clear
logit low age lwt 
matrix define A=e(V)
* replicate se for age
di sqrt(A[1,1])
*************

If you want to conduct operations on matrices and vectors and have Stata
Version >8, try -mata-

*************
mata
stanerr=sqrt(diagonal(st_matrix("e(V)")))
//replicate entire vector of ses
stanerr
end
*************


HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tomas Lind
Gesendet: Mittwoch, 25. Februar 2009 17:13
An: [email protected]
Betreff: Ang. st: AW: var-covar matrix from logistic regression

Thanks for your answer.

I was thinking about using variance-covariance coefficients in calculations
or just display them like I can display:

di exp(_b[smoke])

/Tomas






 

 

 

          st: AW: var-covar matrix from logistic regression

 

 

          Martin Weiss

                       till:

                         statalist

                                                                  2009-02-25
17:04 
 

 

 

 

          Sänt av:

                [email protected]

         Svara till statalist

 

 

 






<>

Re coefficients: what do you mean by "use betas in some calculations?"

After estimation, you can access them as seen in the third line here. If
you
want to store them, i.e. turn the ephemeral "e(b)" into something longer
lasting, see the fourth line.

*************
webuse lbw2, clear
logit low age lwt race2 race3 smoke ptl ht ui
di _b[age]
matrix define A=e(b)
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Tomas Lind
Gesendet: Mittwoch, 25. Februar 2009 16:40
An: [email protected]
Betreff: st: var-covar matrix from logistic regression

Dear Stata,

I have done logistic regression with logit.

How can I look at the variance-covariance matrix? I understand it is saved
in something called e(b), but I can´t see it!

Can I use one of the coefficients like it is possible to use betas in some
calculations? How to do it!

/Tomas


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


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




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


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index