Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: how to get standard errors from VC


From   "Yulia Marchenko" <[email protected]>
To   <[email protected]>
Subject   st: RE: how to get standard errors from VC
Date   Thu, 19 Aug 2004 12:15:36 -0500

On Thursday, Oleksnadr wrote:

>I use matrix commands to estimate the coefficients of a regression. I 
>have got coefficient and variance/covarience matricies: beta and VC. How 
>to get from VC to std. errors?
>I suppose first line is
>ER=vecdiag(VC)
>The second step is to take a square root of each element of ER. How can 
>I do it in one line without going into loops and cyles?

Here is one possibility:

 sysuse auto, clear
 regr price weight mpg
 mat V=vecdiag(cholesky(diag(vecdiag(e(V)))))
 mat list V



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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