-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathe2frame.sthlp
More file actions
89 lines (56 loc) · 3.36 KB
/
Copy pathe2frame.sthlp
File metadata and controls
89 lines (56 loc) · 3.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
{smcl}
{marker e2frame-save-regression-coefficients-and-confidence-intervals-in-a-frame}{...}
{title:{cmd:e2frame} Save regression coefficients and confidence intervals in a frame}
{marker syntax}{...}
{title:Syntax}
{text}{phang2}{cmd:e2frame}, {bf:generate}({it:name}) [{bf:level}({it:number})] [{bf:numeric}]{p_end}
{pstd}{cmd:e2frame} saves the coefficients in {cmd:e(b)} and the confidence intervals from {cmd:e(V)} in a frame. The frame can then be used to create tables or plots. The frame will have the following variables:{p_end}
{text}{phang2}{cmd:i}: index of the variable in the regression{p_end}
{phang2}{cmd:xvar}: name of the variable (string, unless {bf:numeric} is specified){p_end}
{phang2}{cmd:coef}: coefficient estimate{p_end}
{phang2}{cmd:lower}: lower bound of the confidence interval{p_end}
{phang2}{cmd:upper}: upper bound of the confidence interval{p_end}
{pstd}The package can be installed with{p_end}
{p 8 16 2}net install e2frame, from(https://raw.githubusercontent.com/codedthinking/e2frame/main/)
{marker options}{...}
{title:Options}
{marker options-1}{...}
{dlgtab:Options}
{synoptset tabbed}{...}
{synopthdr:Option}
{synoptline}
{synopt:{bf:generate}}Name of the frame to store the coefficients and their confidence interval.{p_end}
{synopt:{bf:level} (optional)}The probability the confidence interval should cover (default is 95).{p_end}
{synopt:{bf: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.{p_end}
{synoptline}
{marker example}{...}
{title:Example}
{p 8 16 2}. 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 |
+---------------------------------------+
{marker authors}{...}
{title:Authors}
{text}{phang2}Miklós Koren (Central European University, {browse "https://koren.dev"}), {it:maintainer}{p_end}
{marker license-and-citation}{...}
{title:License and Citation}
{pstd}You are free to use this package under the terms of its {browse "https://github.com/codedthinking/eventbaseline/blob/main/LICENSE"}. If you use it, please the software package in your work, as shown in CITATION.cff.{p_end}