Search
>> Home >> Resources & support >> FAQs >> Obtaining the variance–covariance matrix or coefficient vector

### 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; updated June 2013

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 retrieving these matrices.

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

. display "The coefficient of mpg = " _b[mpg]
. display "and its standard error = " _se[mpg]


You may also display the covariance or correlation matrix of the parameter estimates of the previous model by using

. estat vce
. estat vce, correlation