Skip to content

Commit e044679

Browse files
committed
adds computations of acceptance rates and IFs in ACF plots
1 parent f355a9b commit e044679

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

vignettes/Chapter07.Rmd

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,8 +1179,23 @@ for (i in seq_along(cthetas)) {
11791179
}
11801180
}
11811181
}
1182+
```
1183+
1184+
Now we plot the ACFs.
1185+
1186+
```{r, echo = -c(1:2), fig.width = 8, fig.height = 3}
1187+
if (pdfplots) {
1188+
pdf("7-3_4.pdf", width = 8, height = 5)
1189+
}
1190+
par(mfcol = c(2, 3), mar = c(2.5, 2.5, 1.5, .1), mgp = c(1.5, .5, 0), lwd = 2)
1191+
for (i in seq_along(cthetas)) {
1192+
ts.plot(thetas[, i])
1193+
acf(thetas[, i])
1194+
title(paste("Acceptance rate:", round(naccepts[i] / ndraws, 3), "|",
1195+
"IF:", round(ndraws / coda::effectiveSize(thetas[, i]), 1)))
1196+
}
1197+
```
11821198

1183-
plot.ts(cbind(eps0s, sigma2s, thetas))
11841199
```
11851200
11861201
# Section 7.4: Markov modeling for a panel of categorical time series

0 commit comments

Comments
 (0)