Skip to content

Commit ffbc08a

Browse files
committed
Axis labels for QQplot
1 parent 74680fa commit ffbc08a

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

vignettes/Chapter06.Rmd

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@ knitr::opts_chunk$set(
1717
fig.height = 6
1818
)
1919
knitr::opts_knit$set(global.par = TRUE)
20-
pdfplots <-FALSE #default: FALSE; set this to TRUE only if you like pdf figures
20+
pdfplots <- TRUE #default: FALSE; set this to TRUE only if you like pdf figures
2121
```
2222

2323
```{r, include = FALSE}
2424
par(mgp = c(1.6, .6, 0), mar = c(2.6, 2.6, 2.6, .4), lwd = 1)
2525
```
2626

2727
# Section 6.1 The Standard Linear Regression Model
28+
2829
### Example 6.1: Movie data
2930

3031
We use the movie data provided within the package to illustrate the
@@ -467,8 +468,9 @@ reg_semiconj <- function(y, X, b0 = 0, B0 = 10000, c0 = 2.5, C0 = 1.5,
467468
```
468469
### Example 6.5: Movie data - Traceplots of the Gibbs sampler
469470

470-
We run the sampler two times for 1000 draws. To show convergence to the posterior distribution we start with a very large and with a very small value for the
471-
innovation variance.
471+
We run the sampler two times for 1000 draws and to show convergence to the
472+
posterior distribution we start from extreme values for the
473+
innovation variance, once from a very large and once from a very small value.
472474

473475
```{r}
474476
set.seed(421)
@@ -813,12 +815,14 @@ par(mfrow = c(1, 2))
813815
qqplot(post.draws.hs$betas[, 1], post.draws.hs2$betas[, 1],
814816
xlim = range(post.draws.hs$betas[, 1], post.draws.hs2$betas[, 1]),
815817
ylim = range(post.draws.hs$betas[, 1], post.draws.hs2$betas[, 1]),
816-
main = "QQ plot for the intercept", xlab = "", ylab = "" )
818+
main = "QQ plot for the intercept", xlab = "Empirical quantiles from the first run",
819+
ylab = "Empirical quantiles from the second run" )
817820
abline(a = 0, b = 1)
818821
qqplot(post.draws.hs$sigma2s, post.draws.hs2$sigma2s,
819822
xlim = range(post.draws.hs$sigma2s, post.draws.hs2$sigma2s),
820823
ylim = range(post.draws.hs$sigma2s, post.draws.hs2$sigma2s),
821-
main = "QQ plot for the error variance", xlab = "", ylab = "")
824+
main = "QQ plot for the error variance", xlab = "Empirical quantiles from the first run",
825+
ylab = "Empirical quantiles from the second run")
822826
abline(a = 0, b = 1)
823827
```
824828

0 commit comments

Comments
 (0)