After running glm
I can type matrix list r(table)
and see a table of all of my results. If I wish, I can write slopes and SEs to variables, e.g., gen B=_b[x1]
or gen se=_se[x1]
. However, this does not work with the confidence limits, ll and ul. How can I access them in a similar manner?
Asked
Active
Viewed 837 times
-2

Aspen Chen
- 735
- 3
- 9

William Shakespeare
- 49
- 5
-
`B=_b[x1]` (is there a `gen` missing?) does not exactly "write slopes and SEs to variables" since there is only one value in `_b[x1]`. Perhaps you meant writing the results to scalars or macros? – Aspen Chen Sep 17 '14 at 22:55
-
@AspenChen-Yes, as I was illustrating the variable assignment, not the programming commands. Agree this is much clearer. I'll try the matrix approach you suggest below. Thanks. – William Shakespeare Sep 18 '14 at 00:43
-
1You might also take a look at `parmest` from SSC. – dimitriy Sep 18 '14 at 00:49
1 Answers
3
I am not sure if the _b[]
and _se[]
results are associated with r(table)
--I have thought they are products of e(b)
and e(V)
.
Anyway, since you have r(table)
, you can just save the results into another matrix, and then use the regular matrix operations to put the lower bounds and upper bounds into new matrices. If for some reason transformation into variables is desired (for example, plotting), there's always -svmat-
.
sysuse auto,clear
glm price mpg foreign, f(gaussian)
mat r=r(table)
matrix ll=r["ll",....]' // see -help matrix extraction-; transposed for svmat
svmat ll,names(ll) // lower bounds are in variable ll1

Aspen Chen
- 735
- 3
- 9