6.12 Exercises

  1. Get the posterior conditional distributions of the Gaussian linear model assuming independent priors \(\pi(\boldsymbol{\beta}, \sigma^2) = \pi(\boldsymbol{\beta}) \times \pi(\sigma^2)\), where \(\boldsymbol{\beta} \sim N(\boldsymbol{\beta}_0, \boldsymbol{B}_0)\) and \(\sigma^2 \sim IG(\alpha_0/2, \delta_0/2)\).

  2. Given the model \(y_i \sim N(\boldsymbol{x}_i^{\top} \boldsymbol{\beta}, \sigma^2/\tau_i)\) (Gaussian linear model with heteroskedasticity) with independent priors, \(\pi(\boldsymbol{\beta}, \sigma^2, \boldsymbol{\tau}) = \pi(\boldsymbol{\beta}) \times \pi(\sigma^2) \times \prod_{i=1}^N \pi(\tau_i)\), where \(\boldsymbol{\beta} \sim N(\boldsymbol{\beta}_0, \boldsymbol{B}_0)\), \(\sigma^2 \sim IG(\alpha_0/2, \delta_0/2)\), and \(\tau_i \sim G(v/2, v/2)\). Show that \[ \boldsymbol{\beta} \mid \sigma^2, \boldsymbol{\tau}, \boldsymbol{y}, \boldsymbol{X} \sim N(\boldsymbol{\beta}_n, \boldsymbol{B}_n), \quad \sigma^2 \mid \boldsymbol{\beta}, \boldsymbol{\tau}, \boldsymbol{y}, \boldsymbol{X} \sim IG(\alpha_n/2, \delta_n/2), \] and \[ \tau_i \mid \boldsymbol{\beta}, \sigma^2, \boldsymbol{y}, \boldsymbol{X} \sim G(v_{1n}/2, v_{2in}/2), \] where \(\boldsymbol{\tau} = [\tau_1 \dots \tau_n]^{\top}\), \(\boldsymbol{B}_n = (\boldsymbol{B}_0^{-1} + \sigma^{-2} \boldsymbol{X}^{\top} \Psi \boldsymbol{X})^{-1}\), \[ \boldsymbol{\beta}_n = \boldsymbol{B}_n (\boldsymbol{B}_0^{-1} \boldsymbol{\beta}_0 + \sigma^{-2} \boldsymbol{X}^{\top} \Psi \boldsymbol{y}), \] \(\alpha_n = \alpha_0 + N\), \(\delta_n = \delta_0 + (\boldsymbol{y} - \boldsymbol{X} \boldsymbol{\beta})^{\top} \Psi (\boldsymbol{y} - \boldsymbol{X} \boldsymbol{\beta})\), \(v_{1n} = v + 1\), \(v_{2in} = v + \sigma^{-2}(y_i - \boldsymbol{x}_i^{\top} \boldsymbol{\beta})^2\), and \(\Psi = \text{diagonal}\{\tau_i\}\).

  3. The market value of soccer players in Europe continues
    Use the setting of the previous exercise to perform inference using a Gibbs sampling algorithm of the market value of soccer players in Europe, setting \(v = 5\) and the same other hyperparameters as the homoscedastic case. Is there any meaningful difference for the coefficient associated with the national team compared to the application in the homoscedastic case?

  4. Example: Determinants of hospitalization continues
    Program a Gibbs sampling algorithm in the application of determinants of hospitalization.

  5. Choice of the fishing mode continues

  6. Simulation exercise of the multinomial logit model continues
    Perform inference in the simulation of the multinomial logit model using the command rmnlIndepMetrop from the bayesm package of R and using our GUI.

  7. Simulation of the ordered probit model
    Simulate an ordered probit model where the first regressor distributes \(N(6, 5)\) and the second distributes \(G(1, 1)\), the location vector is \(\boldsymbol{\beta} = \left[ 0.5, -0.25, 0.5 \right]^{\top}\), and the cutoffs are in the vector \(\boldsymbol{\alpha} = \left[ 0, 1, 2.5 \right]^{\top}\). Program from scratch a Metropolis-within-Gibbs sampling algorithm to perform inference in this simulation.

  8. Simulation of the negative binomial model continues
    Perform inference in the simulation of the negative binomial model using the bayesm package in R software.

  9. The market value of soccer players in Europe continues
    Perform the application of the value of soccer players with left censoring at one million Euros in our GUI using the Algorithm of the Tobit models, and the hyperparameters of the example.

  10. The market value of soccer players in Europe continues
    Program from scratch the Gibbs sampling algorithm in the example of the market value of soccer players at the 0.75 quantile.

  11. Use the bayesboot package to perform inference in the simulation exercise of Section 6.10, and compare the results with the ones that we get using our GUI, setting \(S = 10000\).

References

Geweke, J. 1992. “Bayesian Statistics.” In. Clarendon Press, Oxford, UK.
Heidelberger, P., and P. D. Welch. 1983. “Simulation Run Length Control in the Presence of an Initial Transient.” Operations Research 31 (6): 1109–44.
Raftery, A. E., and S. M. Lewis. 1992. “One Long Run with Diagnostics: Implementation Strategies for Markov Chain Monte Carlo.” Statistical Science 7: 493–97.