-
Notifications
You must be signed in to change notification settings - Fork 11
/
macros.qmd
215 lines (215 loc) · 6.42 KB
/
macros.qmd
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
\providecommand{\cbl}[1]{\left\{#1\right.}
\providecommand{\cb}[1]{\left\{#1\right\}}
\providecommand{\paren}[1]{\left(#1\right)}
\providecommand{\sb}[1]{\left[#1\right]}
\def\pr{\text{p}}
\def\am{\arg \max}
\def\argmax{\arg \max}
\def\p{\text{p}}
\def\P{\text{P}}
\def\ph{\hat{\text{p}}}
\def\hp{\hat{\text{p}}}
\def\ga{\alpha}
\def\b{\beta}
\providecommand{\floor}[1]{\left \lfloor{#1}\right \rfloor}
\providecommand{\ceiling}[1]{\left \lceil{#1}\right \rceil}
\providecommand{\ceil}[1]{\left \lceil{#1}\right \rceil}
\def\Ber{\text{Ber}}
\def\Bernoulli{\text{Bernoulli}}
\def\Pois{\text{Pois}}
\def\Poisson{\text{Poisson}}
\def\Gaus{\text{Gaussian}}
\def\Normal{\text{N}}
\def\NB{\text{NegBin}}
\def\NegBin{\text{NegBin}}
\def\vbeta{\vec \beta}
\def\vb{\vec \b}
\def\v0{\vec{0}}
\def\gb{\beta}
\def\gg{\gamma}
\def\gd{\delta}
\def\eps{\varepsilon}
\def\om{\omega}
\def\m{\mu}
\def\s{\sigma}
\def\l{\lambda}
\def\gs{\sigma}
\def\gm{\mu}
\def\M{\text{M}}
\def\gM{\text{M}}
\def\Mu{\text{M}}
\def\cd{\cdot}
\def\cds{\cdots}
\def\lds{\ldots}
\def\eqdef{\stackrel{\text{def}}{=}}
\def\defeq{\stackrel{\text{def}}{=}}
\def\hb{\hat \beta}
\def\hl{\hat \lambda}
\def\hy{\hat y}
\def\yh{\hat y}
\def\V{{\text{Var}}}
\def\hs{\hat \sigma}
\def\hsig{\hat \sigma}
\def\hS{\hat \Sigma}
\def\hSig{\hat \Sigma}
\def\hSigma{\hat \Sigma}
\def\hSurv{\hat{S}}
\providecommand{\hSurvf}[1]{\hat{S}\paren{#1}}
\def\dist{\ \sim \ }
\def\ddist{\ \dot{\sim} \ }
\def\dsim{\ \dot{\sim} \ }
\def\za{z_{1 - \frac{\alpha}{2}}}
\def\cirad{\za \cdot \hse{\hb}}
\def\ci{\hb {\color{red}\pm} \cirad}
\def\th{\theta}
\def\Th{\Theta}
\def\xbar{\bar{x}}
\def\hth{\hat\theta}
\def\hthml{\hth_{\text{ML}}}
\def\ba{\begin{aligned}}
\def\ea{\end{aligned}}
\def\ind{⫫}
\def\indpt{⫫}
\def\all{\forall}
\def\iid{\text{iid}}
\def\ciid{\text{ciid}}
\def\simind{\ \sim_{\ind}\ }
\def\siid{\ \sim_{\iid}\ }
\def\simiid{\siid}
\def\distiid{\siid}
\def\tf{\therefore}
\def\Lik{\mathcal{L}}
\def\llik{\ell}
\providecommand{\llikf}[1]{\llik \paren{#1}}
\def\score{\ell'}
\providecommand{\scoref}[1]{\score \paren{#1}}
\def\hess{\ell''}
\def\hessian{\ell''}
\providecommand{\hessf}[1]{\hess \paren{#1}}
\providecommand{\hessianf}[1]{\hess \paren{#1}}
\providecommand{\starf}[1]{#1^*}
\def\lik{\ell}
\providecommand{\est}[1]{\widehat{#1}}
\providecommand{\esttmp}[1]{{\widehat{#1}}^*}
\def\esttmpl{\esttmp{\lambda}}
\def\cR{\mathcal{R}}
\def\range{\mathcal{R}}
\def\Range{\mathcal{R}}
\providecommand{\rangef}[1]{\cR(#1)}
\def\~{\approx}
\def\dapp{\dot\approx}
\providecommand{\red}[1]{{\color{red}#1}}
\providecommand{\deriv}[1]{\frac{\partial}{\partial #1}}
\providecommand{\derivf}[2]{\frac{\partial #1}{\partial #2}}
\providecommand{\blue}[1]{{\color{blue}#1}}
\providecommand{\green}[1]{{\color{green}#1}}
\providecommand{\hE}[1]{\hat{\text{E}}\sb{#1}}
\providecommand{\hExp}[1]{\hat{\text{E}}\sb{#1}}
\providecommand{\hmu}[1]{\hat{\mu}\sb{#1}}
\def\Expp{\mathbb{E}}
\def\Ep{\mathbb{E}}
\def\expit{\text{expit}}
\providecommand{\expitf}[1]{\expit\cb{#1}}
\providecommand{\dexpitf}[1]{\expit'\cb{#1}}
\def\logit{\text{logit}}
\providecommand{\logitf}[1]{\logit\cb{#1}}
\providecommand{\E}[1]{\mathbb{E}\sb{#1}}
\providecommand{\Ef}[1]{\mathbb{E}\sb{#1}}
\providecommand{\Exp}[1]{\mathbb{E}\sb{#1}}
\providecommand{\Expf}[1]{\mathbb{E}\sb{#1}}
\def\Varr{\text{Var}}
\providecommand{\var}[1]{\text{Var}\paren{#1}}
\providecommand{\varf}[1]{\text{Var}\paren{#1}}
\providecommand{\Var}[1]{\text{Var}\paren{#1}}
\providecommand{\Varf}[1]{\text{Var}\paren{#1}}
\def\Covt{\text{Cov}}
\providecommand{\covh}[1]{\widehat{\text{Cov}}\paren{#1}}
\providecommand{\Cov}[1]{\Covt \paren{#1}}
\providecommand{\Covf}[1]{\Covt \paren{#1}}
\def\varht{\widehat{\text{Var}}}
\providecommand{\varh}[1]{\varht\paren{#1}}
\providecommand{\varhf}[1]{\varht\paren{#1}}
\providecommand{\vc}[1]{\boldsymbol{#1}}
\providecommand{\sd}[1]{\text{sd}\paren{#1}}
\providecommand{\SD}[1]{\text{SD}\paren{#1}}
\providecommand{\hSD}[1]{\widehat{\text{SD}}\paren{#1}}
\providecommand{\se}[1]{\text{se}\paren{#1}}
\providecommand{\hse}[1]{\hat{\text{se}}\paren{#1}}
\providecommand{\SE}[1]{\text{SE}\paren{#1}}
\providecommand{\HSE}[1]{\widehat{\text{SE}}\paren{#1}}
\renewcommand{\log}[1]{\text{log}\cb{#1}}
\providecommand{\logf}[1]{\text{log}\cb{#1}}
\def\dlog{\text{log}'}
\providecommand{\dlogf}[1]{\dlog \cb{#1}}
\renewcommand{\exp}[1]{\text{exp}\cb{#1}}
\providecommand{\expf}[1]{\exp{#1}}
\def\dexp{\text{exp}'}
\providecommand{\dexpf}[1]{\dexp \cb{#1}}
\providecommand{\e}[1]{\text{e}^{#1}}
\providecommand{\ef}[1]{\text{e}^{#1}}
\providecommand{\inv}[1]{\paren{#1}^{-1}}
\providecommand{\invf}[1]{\paren{#1}^{-1}}
\def\oinf{I}
\def\Nat{\mathbb{N}}
\providecommand{\oinff}[1]{\oinf\paren{#1}}
\def\einf{\mathcal{I}}
\providecommand{\einff}[1]{\einf\paren{#1}}
\def\heinf{\hat{\einf}}
\providecommand{\heinff}[1]{\heinf \paren{#1}}
\providecommand{\1}[1]{\mathbb{1}_{#1}}
\providecommand{\set}[1]{\cb{#1}}
\providecommand{\pf}[1]{\p \paren{#1}}
\providecommand{\Bias}[1]{\text{Bias}\paren{#1}}
\providecommand{\bias}[1]{\text{Bias}\paren{#1}}
\def\ss{\sigma^2}
\providecommand{\ssqf}[1]{\sigma^2\paren{#1}}
\providecommand{\mselr}[1]{\text{MSE}\paren{#1}}
\providecommand{\maelr}[1]{\text{MAE}\paren{#1}}
\providecommand{\abs}[1]{\left|#1\right|}
\providecommand{\sqf}[1]{\paren{#1}^2}
\providecommand{\sq}{^2}
\def\err{\eps}
\providecommand{\erf}[1]{\err\paren{#1}}
\renewcommand{\vec}[1]{\tilde{#1}}
\providecommand{\v}[1]{\vec{#1}}
\providecommand{\matr}[1]{\mathbf{#1}}
\def\mX{\matr{X}}
\def\mx{\matr{x}}
\def\vx{\vec{x}}
\def\vX{\vec{X}}
\def\vy{\vec{y}}
\def\vY{\vec{Y}}
\def\vpi{\vec{\pi}}
\providecommand{\mat}[1]{\mathbf{#1}}
\providecommand{\dsn}[1]{#1_1, \ldots, #1_n}
\def\X1n{\dsn{X}}
\def\Xin{\dsn{X}}
\def\x1n{\dsn{x}}
\def\'{^{\top}}
\def\dpr{\cdot}
\def\Xx1n{X_1=x_1, \ldots, X_n = x_n}
\providecommand{\dsvn}[2]{#1_1=#2_1, \ldots, #1_n = #2_n}
\providecommand{\sumn}[1]{\sum_{#1=1}^n}
\def\sumin{\sum_{i=1}^n}
\def\sumi1n{\sum_{i=1}^n}
\def\prodin{\prod_{i=1}^n}
\def\prodi1n{\prod_{i=1}^n}
\providecommand{\lp}[2]{#1 \' \beta}
\def\odds{\omega}
\def\OR{\text{OR}}
\def\logodds{\eta}
\def\oddst{\text{odds}}
\def\probst{\text{probs}}
\def\probt{\text{probt}}
\def\probit{\text{probit}}
\providecommand{\oddsf}[1]{\oddst\cb{#1}}
\providecommand{\doddsf}[1]{{\oddst}'\cb{#1}}
\def\oddsinv{\text{invodds}}
\providecommand{\oddsinvf}[1]{\oddsinv\cb{#1}}
\def\invoddsf{\oddsinvf}
\providecommand{\doddsinvf}[1]{{\oddsinv}'\cb{#1}}
\def\dinvoddsf{\doddsinvf}
\def\haz{h}
\def\cuhaz{H}
\def\incidence{\bar{\haz}}
\def\phaz{\Expf{\haz}}