Stata 15 help for get()

[P] matrix get -- Access system matrices

Syntax

matrix [define] matname = get(systemname)

where systemname is

_b coefficients after any estimation command VCE covariance matrix of estimators after any estimation command Rr constraint matrix after test Cns constraint matrix after any estimation command

Description

The get() matrix function obtains a copy of an internal Stata system matrix. Some system matrices can also be obtained more easily by directly referring to the returned result after a command. In particular, the coefficient vector can be referred to as e(b), the variance-covariance matrix of estimators as e(V), and the constraints matrix as e(Cns) after an estimation command.

See mat_put_rr for a programmer's command to directly post matname as the internal Rr matrix.

Remarks

get() obtains copies of matrices containing coefficients and the covariance matrix of the estimators after estimation commands (such as regress and probit) and obtains copies of matrices left behind by other Stata commands. The other side of get() is ereturn post, which allows ado-file estimation commands to post results to Stata's internal areas; see [P] ereturn.

Examples

. sysuse auto . regress price weight mpg . matrix list e(b) . matrix list e(V)

. matrix b = get(_b) . matrix V = get(VCE) . matrix list b . matrix list V

. test weight=1, notest . test mpg=40, accum . matrix rxtr=get(Rr) . matrix list rxtr


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index