1. (30pts total, equally weighted) PH Exercise 9.2 (the diabetes data)
2. (60pts total, equally weighted) Consider the diabetes data azdiabetes.dat in class. The goal here is
to fit a Bayesian logistic regression model with the variable diabetes as the response and npreg, bp,
bmi, pred, and age as the covariates. Suppose that the logistic regression model we consider is of the
form Pr(Yi = 1 | xi
, β, γ) = e
θi /(1 + e
θi ) where β = (β0, . . . , β5), γ = (γ1, . . . , γ5) and
θi = β0 +
X
5
j=1
βjγjxi,jHere γj = 1 if the jth variable is a predictor of diabetes and 0 otherwise. For example, γ = (1, 1, 0, 0, 0)
corresponds to the model θi = β0 + β1xi,1 + β2xi,2. Obtain posterior distribution of β and γ, assuming
the following independent priors.
γj ∼ Ber(0.5), β0 ∼ Normal(0, 16), βj ∼ Normal(0, 4)
1
for each j > 0.a. Derive the full conditional distributions for βj with j = 0, 1, . . . , 5 and γj with j = 1, . . . , 5.
b. Implement a Metropolis-Hastings algorithm to obtain MCMC samples from the joint posterior distribution and perform convergence diagnostics.c. Report the 95% credible intervals for the parameters βj with j = 0, 1, . . . , 5 and report the posterior
including probabilities for each covariate.
Homework, MATH8050:, Model, Regression, Selection, solved
[SOLVED] Regression and model selection math8050: homework 9
$25
File Name: Regression_and_model_selection_math8050:_homework_9.zip
File Size: 480.42 KB
Only logged in customers who have purchased this product may leave a review.
Reviews
There are no reviews yet.