Stata
Products Purchase Support Company
Search
   >> Home >> Resources & support >> FAQs >> Obtaining the variance–covariance matrix or coefficient vector Bookmark and Share

How can I get the variance–covariance matrix or coefficient vector?

Title   Obtaining the variance–covariance matrix or coefficient vector
Author Paul Lin, StataCorp
Date January 1999; minor revisions June 2007

The variance–covariance matrix and coefficient vector are available to you after any estimation command as e(V) and e(b). You can use them directly, or you can place them in a matrix of your choosing.

. matrix list e(V)
. matrix list e(b)
. matrix x = e(V)
. matrix y = e(b)
. matrix z = 0.1 * I(4) + 0.9 * e(V)

The matrix function get (see [P] matrix get) is also available for retreiving these matrices.

You may also access the coefficients and standard errors in expressions by using

. display "The coefficient of mpg = " _b[mpg]
. display "and its standard error = " _se[mpg]
FAQs
What's new?
Statistics
Data management
Graphics
Programming Stata
Mata
Resources
Internet capabilities
Stata for Windows
Stata for Unix
Stata for Mac
Technical support
Resources & support
FAQs
Technical support
NetCourses
Short courses
Users Group meetings
Statalist
Links
Software updates
Software archives
Customer service
Manuals & supplements
Stata Journal
STB
Stata News
Stata Automation
Plugins

Site overview
Products
Resources & support
Company
Site index

© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index