Skip to content

Commit 01a99aa

Browse files
committed
Deploying to gh-pages from @ fd47f8f 🚀
1 parent b058f33 commit 01a99aa

4 files changed

Lines changed: 41 additions & 27 deletions

File tree

articles/Chapter08.html

Lines changed: 27 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

articles/Chapter08.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ X.unemp <- with(labor, cbind(intercept = rep(1, N.unemp),
2929
unemp97 = income_1997 == "zero")) # regressor matrix
3030
```
3131

32+
#### Example 8.2.
33+
3234
The regression coefficients are estimated using data augmentation and
3335
Gibbs sampling. We define a function yielding posterior draws using the
3436
algorithm detailed in Chapter 8.1.1.
@@ -147,6 +149,9 @@ effectiveSize(betas)
147149

148150
The sampler is easy to implement, however there might be problems when
149151
the response variable contains either only few or very many successes.
152+
153+
#### Example 8.3
154+
150155
To illustrate this issue, we use data where in $N = 500$ trials only 1
151156
success or only 1 failure is observed.
152157

@@ -195,7 +200,7 @@ failures can be perfectly predicted by a covariate, whereas
195200
quasi-complete separation means that either successes or failures can be
196201
predicted perfectly.
197202

198-
## Example 8.3
203+
## Example 8.4
199204

200205
To illustrate the effect of complete separation on the estimates, we
201206
generate $N = 500$ observations with half of them successes and the
@@ -240,7 +245,7 @@ effectiveSize(betas.sep)
240245
#> 8.375523 8.269881
241246
```
242247

243-
## Example 8.4
248+
## Example 8.5
244249

245250
To illustrate quasi-seperation we use the same responses as in Example
246251
8.3., but now set $x = 1$ for all successes and additionally for 100
@@ -366,7 +371,7 @@ effectiveSize(betas.sep1)
366371

367372
### Section 8.1.2: Logit model
368373

369-
### Example 8.5: Labor market data
374+
#### Example 8.6: Labor market data
370375

371376
We now estimate a logistic regression model for the labor market data
372377
using the two-block Polya-Gamma sampler.
@@ -475,7 +480,7 @@ knitr::kable(round(res_beta * pi / sqrt(3), 3))
475480

476481
### Section 8.2.1: Poisson regression models
477482

478-
### Example 8.6: Road safety data
483+
#### Example 8.7: Road safety data
479484

480485
We fit two different Poisson regression models:
481486

@@ -695,7 +700,7 @@ print(res2$accept)
695700

696701
### Section 8.2.2: Negative binomial regression
697702

698-
### Example 8.7: Road safety data
703+
### Example 8.8: Road safety data
699704

700705
Now we analyse the road safety data allowing for unobserved
701706
heterogeneity. We first set up both the two versions of the three-block
@@ -883,7 +888,7 @@ abline(a = 0, b = 1)
883888

884889
### Section 8.3.1: Regression analysis with heteroskedastic errors
885890

886-
### Example 8.12: Star cluster data
891+
#### Example 8.12: Star cluster data
887892

888893
The bivariate data set of the star cluster CYG OB1 is available in
889894
package *robustbase* and we load it from this package and visualize it
@@ -949,7 +954,7 @@ lines(xnew, preds_subset[, "upr"], lty = 2)
949954

950955
![](Chapter08_files/figure-html/unnamed-chunk-41-1.png)
951956

952-
### Example 8.11: Star cluster data - heteroskedastic regression analysis with known outliers
957+
### Example 8.13: Star cluster data - heteroskedastic regression analysis with known outliers
953958

954959
We define the binary indicator indicating outlying observations, i.e.,
955960
in this case observations corresponding to giant stars.

pkgdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ articles:
1111
Chapter07: Chapter07.html
1212
Chapter08: Chapter08.html
1313
Chapter09: Chapter09.html
14-
last_built: 2026-02-12T19:11Z
14+
last_built: 2026-02-12T21:56Z
1515
urls:
1616
reference: https://gregorkastner.github.io/BayesianLearningCode/reference
1717
article: https://gregorkastner.github.io/BayesianLearningCode/articles

search.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)