Skip to content

Commit 8fb73cc

Browse files
committed
Deploying to gh-pages from @ 0919ae6 🚀
1 parent 31647a6 commit 8fb73cc

18 files changed

Lines changed: 59 additions & 59 deletions

articles/Chapter07.html

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

articles/Chapter07.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ library(BayesianLearningCode)
3939
library(mvtnorm)
4040

4141
regression <- function(y, X, prior = "improper", b0 = 0, B0 = 1, c0 = 0.01,
42-
C0 = 0.01, nburn = 1000L, M = 5000L) {
42+
C0 = 0.01, nburn = 1000L, M = 10000L) {
4343

4444
N <- nrow(X)
4545
d <- ncol(X)
@@ -339,7 +339,7 @@ nonstationary[, 2] <- ar2draws[,1] + ar2draws[,2] > 1 |
339339
nonstationary[ ,3] <- apply(Mod(eigenvalues) > 1, 1, any)
340340
colMeans(nonstationary)
341341
#> 1 2 3
342-
#> 0.0422 0.0088 0.0028
342+
#> 0.0405 0.0107 0.0031
343343
```
344344

345345
### Section 7.2.3: Recovering Missing Time Series Data – An Introduction to Data Augmentation
@@ -811,23 +811,23 @@ ess <- rbind(unrestricted = c(ess1, y0 = NA),
811811
knitr::kable(round(ess))
812812
```
813813

814-
| | zeta | phi | sigma2 | y0 |
815-
|:---------------------|-----:|-----:|-------:|------:|
816-
| unrestricted | 4904 | 5256 | 5000 | NA |
817-
| postprocessed | 4769 | 4789 | 4789 | NA |
818-
| betapriorflat | 2158 | 1835 | 10000 | 9622 |
819-
| betapriorinformative | 693 | 331 | 5745 | 10000 |
814+
| | zeta | phi | sigma2 | y0 |
815+
|:---------------------|-----:|------:|-------:|------:|
816+
| unrestricted | 9562 | 10000 | 10000 | NA |
817+
| postprocessed | 9202 | 9595 | 9595 | NA |
818+
| betapriorflat | 2179 | 1955 | 9490 | 9255 |
819+
| betapriorinformative | 783 | 398 | 5194 | 10000 |
820820

821821
``` r
822822
knitr::kable(round(ndraws / ess, 2))
823823
```
824824

825825
| | zeta | phi | sigma2 | y0 |
826826
|:---------------------|------:|------:|-------:|-----:|
827-
| unrestricted | 2.04 | 1.90 | 2.00 | NA |
828-
| postprocessed | 2.10 | 2.09 | 2.09 | NA |
829-
| betapriorflat | 4.63 | 5.45 | 1.00 | 1.04 |
830-
| betapriorinformative | 14.42 | 30.21 | 1.74 | 1.00 |
827+
| unrestricted | 1.05 | 1.00 | 1.00 | NA |
828+
| postprocessed | 1.09 | 1.04 | 1.04 | NA |
829+
| betapriorflat | 4.59 | 5.12 | 1.05 | 1.08 |
830+
| betapriorinformative | 12.77 | 25.15 | 1.93 | 1.00 |
831831

832832
We now repeat the above exercise, but use the conditional posterior
833833
resulting from an auxiliary moment-matched prior in Step (d).
@@ -994,17 +994,17 @@ knitr::kable(round(ess))
994994

995995
| | zeta | phi | sigma2 | y0 |
996996
|:----------|-----:|----:|-------:|------:|
997-
| Sampler 1 | 693 | 331 | 5745 | 10000 |
998-
| Sampler 2 | 835 | 443 | 6443 | 10040 |
997+
| Sampler 1 | 783 | 398 | 5194 | 10000 |
998+
| Sampler 2 | 1042 | 549 | 6342 | 10000 |
999999

10001000
``` r
10011001
knitr::kable(round(ndraws / ess, 2))
10021002
```
10031003

10041004
| | zeta | phi | sigma2 | y0 |
10051005
|:----------|------:|------:|-------:|----:|
1006-
| Sampler 1 | 14.42 | 30.21 | 1.74 | 1 |
1007-
| Sampler 2 | 11.97 | 22.56 | 1.55 | 1 |
1006+
| Sampler 1 | 12.77 | 25.15 | 1.93 | 1 |
1007+
| Sampler 2 | 9.60 | 18.23 | 1.58 | 1 |
10081008

10091009
## Section 7.3: Some Extensions
10101010

-3.54 KB
Loading
1.37 KB
Loading
388 Bytes
Loading
-1.12 KB
Loading
10.2 KB
Loading
-922 Bytes
Loading
-2.04 KB
Loading
3.39 KB
Loading

0 commit comments

Comments
 (0)