| author | date | version | title | description | url | requires |
|---|---|---|---|---|---|---|
Koren, Miklós (https://koren.dev) |
2025-10-09 |
0.2.1 |
E2FRAME - Save regression coefficients and confidence intervals in a frame |
`e2frame` saves the coefficients and confidence intervals of the last regression in a frame.
|
Stata version 16 |
e2frame, generate(name) [level(number)] [numeric]
e2frame saves the coefficients in e(b) and the confidence intervals from e(V) in a frame. The frame can then be used to create tables or plots. The frame will have the following variables:
i: index of the variable in the regressionxvar: name of the variable (string, unless numeric is specified)coef: coefficient estimatelower: lower bound of the confidence intervalupper: upper bound of the confidence interval
The package can be installed with
net install e2frame, from(https://raw.githubusercontent.com/codedthinking/e2frame/main/)
| Option | Description |
|---|---|
| generate | Name of the frame to store the coefficients and their confidence interval. |
| level (optional) | The probability the confidence interval should cover (default is 95). |
| numeric (optional) | If specified, the variable names in the regression table are treated as numeric values. This is useful when the variable names are years or other numeric values. |
. sysuse auto
(1978 automobile data)
. regress mpg weight
Source | SS df MS Number of obs = 74
-------------+---------------------------------- F(1, 72) = 134.62
Model | 1591.9902 1 1591.9902 Prob > F = 0.0000
Residual | 851.469256 72 11.8259619 R-squared = 0.6515
-------------+---------------------------------- Adj R-squared = 0.6467
Total | 2443.45946 73 33.4720474 Root MSE = 3.4389
------------------------------------------------------------------------------
mpg | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------+----------------------------------------------------------------
weight | -.0060087 .0005179 -11.60 0.000 -.0070411 -.0049763
_cons | 39.44028 1.614003 24.44 0.000 36.22283 42.65774
------------------------------------------------------------------------------
. e2frame, generate(cars)
. frame cars: list
+---------------------------------------+
| i xvar coef lower upper |
|---------------------------------------|
1. | 1 weight -0.006 -0.007 -0.005 |
2. | 2 _cons 39.440 36.277 42.604 |
+---------------------------------------+
- Miklós Koren (Central European University, https://koren.dev), maintainer
You are free to use this package under the terms of its license. If you use it, please the software package in your work, as shown in CITATION.cff.