Skip to content

Commit e0595f8

Browse files
HumphreyYangCopilotmmcky
authored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]> Co-authored-by: Matt McKay <[email protected]>
1 parent fb8fb92 commit e0595f8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lectures/ar1_bayes.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def AR1_model(data):
201201
yhat = ρ * data[:-1]
202202
203203
# Likelihood of the actual realization.
204-
y_data = numpyro.sample('y_obs',
204+
numpyro.sample('y_obs',
205205
dist.Normal(loc=yhat, scale=σ), obs=data[1:])
206206
207207
```
@@ -226,7 +226,7 @@ plot_posterior(mcmc.get_samples())
226226
227227
Evidently, the posteriors aren't centered on the true values of $.5, 1$ that we used to generate the data.
228228
229-
This is a symptom of the classic **Hurwicz bias** for first order autoregressive processes (see Leonid Hurwicz {cite}`hurwicz1950least`.)
229+
This is a symptom of the classic **Hurwicz bias** for first order autoregressive processes (see {cite}`hurwicz1950least`.)
230230
231231
The Hurwicz bias is worse the smaller is the sample (see {cite}`Orcutt_Winokur_69`).
232232
@@ -259,9 +259,9 @@ def AR1_model_y0(data):
259259
yhat = ρ * data[:-1]
260260
261261
# Likelihood of the actual realization.
262-
y_data = numpyro.sample('y_obs',
262+
numpyro.sample('y_obs',
263263
dist.Normal(loc=yhat, scale=σ), obs=data[1:])
264-
y0_data = numpyro.sample('y0_obs',
264+
numpyro.sample('y0_obs',
265265
dist.Normal(loc=0., scale=y_sd), obs=data[0])
266266
```
267267

0 commit comments

Comments
 (0)