Question: Answer part(b) or part(c), which does not require the data. Would be great if you can solve both!!!!! The data set loan_data. cav contains data
Answer part(b) or part(c), which does not require the data. Would be great if you can solve both!!!!!
The data set loan_data. cav contains data from the year 2018 on the loan status of 6536 personal loans issued in the US states of Connecticut, Maine, Massachusetts, New Hampshire, Rhode Island, Vermont. (Note: these 6 states comprise the 'New England' region of the northeastern part of the US). The variable loan status = 1 if the loan is in default, and = 0 otherwise. Treating each loan (as identified by a unique id ) as a 'trial' and 'defaults' as successes, the Binomial sampling model is a natural choice as the sampling distribution for this data. The objective is to learn about the probability of personal loan default , in each New England state, j = 1, ..., 6. (a) [3 marks] Consider a hierarchical Bayesian binomial model to estimate the 0j's. Discuss the advantages and disadvantages of the hierarchical modelling approach in contrast to the common probability model which assumes a common 0 applies to all states, and the separate-probability model which creates six separate Binomial sampling models, one for each state. (b) [1 mark] Let Yy denote the loan status for loan i in state j (i=1,..,n;, where n, is the sample size in state j). We have Y|0, " Binomial (0,). Write down your prior distribution assumption for e;. (c) [1 mark] As we are fitting a hierarchical model, we require a hyperprior distribution on the parameters of the prior distribution you wrote down in part (b). Write down your hyperprior distribution assumption(s). (d) [5 marks] To obtain posterior draws of the parameters in this model, we need to run a Markov Chain simulation. Write out the steps of a Metropolis-Hastings algorithm to be run at each iteration to obtain posterior draws of the parameters of your hierarchical model. (e) [4 marks] Run your Metropolis-Hastings algorithm. Insert your computer code here that you used to run your Metropolis-Hastings algorithm or upload it is a separate (clearly labelled) file. (f) [2 marks] Provide estimates for the loan default rate for each state and corresponding 95% posterior confidence intervals. (g) [1 mark] What was the acceptance rate of your Metropolis-Hastings algorithm? If the acceptance rate is too low or too high, briefly comment on how you could modify the sampling algorithm to improve the acceptance rateStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
