@@ -792,17 +792,17 @@ if (pdfplots) {
792792 pdf("7-2_12.pdf", width = 8, height = 5)
793793}
794794par(mfrow = c(1, 1), mar = c(2.5, 2.5, 1.5, .1), mgp = c(1.5, .5, 0), lwd = 1.5)
795- mybreaks <- seq(floor(100 * .995 * min(stationary1$phi, stationary2$phi)) / 100,
796- ceiling(100 * 1.015 * max(ar1draws)) / 100,
797- by = .0025 )
798- hist(ar1draws[!nonstationary[, 1]], breaks = mybreaks, col = rgb(0, 0, 1 , .2),
795+ mybreaks <- seq(floor(100 * min(stationary1$phi, stationary2$phi)) / 100,
796+ ceiling(100 * max(ar1draws)) / 100,
797+ by = .005 )
798+ hist(stationary2$phi, breaks = mybreaks, col = rgb(1, 1, 0 , .2),
799799 main = "Histogram of posterior draws", xlab = expression(phi),
800- freq = FALSE)
801- hist(ar1draws, breaks = mybreaks, col = rgb(0, 1, 0, .2),
802- freq = FALSE, add = TRUE)
800+ freq = FALSE, ylab = "")
803801hist(stationary1$phi, breaks = mybreaks, col = rgb(1, 0, 0, .2),
804802 freq = FALSE, add = TRUE)
805- hist(stationary2$phi, breaks = mybreaks, col = rgb(1, 1, 0, .2),
803+ hist(ar1draws[!nonstationary[, 1]], breaks = mybreaks, col = rgb(0, 0, 1, .2),
804+ freq = FALSE, add = TRUE)
805+ hist(ar1draws, breaks = mybreaks, col = rgb(0, 1, 0, .2),
806806 freq = FALSE, add = TRUE)
807807legend("topright",
808808 c("Unrestricted posterior", "Post-processed posterior",
@@ -988,9 +988,10 @@ mybreaks <- seq(min(stationary2$phi, stationary3$phi),
988988 max(stationary2$phi, stationary3$phi),
989989 length.out = 30)
990990hist(stationary2$phi, breaks = mybreaks, col = rgb(0, 0, 1, .3),
991- main = "Histogram", xlab = expression(phi), freq = FALSE)
991+ main = "Histogram", xlab = expression(phi), freq = FALSE, ylab = "" )
992992hist(stationary3$phi, breaks = mybreaks, col = rgb(1, 0, 0, .3), freq = FALSE,
993993 add = TRUE)
994+ legend("topleft", c("Sampler 1", "Sampler 2"), fill = rgb(0:1, 0, 1:0, .3))
994995qqplot(stationary2$phi, stationary3$phi, xlab = "Sampler 1", ylab = "Sampler 2",
995996 main = "QQ plot")
996997abline(0, 1, col = 2)
0 commit comments