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/