Hi consider the following
This produces the following output:
Why is it that, even though we can clearly see that the variance-covariance matrix has row names and column names, we can't access its elements using them? Clearly this is not a problem for the diagonal elements, i.e. the variances, since we can always access them through the system vector _se, but what about the covariances? I find this very surprising. Is there any way to access them via the variables' names, or _cons for the intercept? I have searched the forum and Google, and have found no solution for this. I apologize if I have missed it.
Code:
clear all set more off sysuse auto quiet reg price mpg foreign weight mat vc = e(V) mat list vc di vc[mpg,foreign] di vc[1,2]
Code:
. clear all . set more off . . sysuse auto (1978 Automobile Data) . quiet reg price mpg foreign weight . mat vc = e(V) . mat list vc symmetric vc[4,4] mpg foreign weight _cons mpg 5508.7774 foreign 9089.6431 467826.27 weight 36.2912 218.835 .39784425 _cons -229604.2 -993431.72 -2039.2381 11404044 . di vc[mpg,foreign] . . di vc[1,2] 9089.6431
Comment