Starting from:

$30

Bayesian-Homework 2 Regression Solved

Data
The data in ‘ElectricCarData_Clean.csv’ (from Kaggle) represent quantitative characteristics of a sample of n = 103 electric vehicles available in Europe. For this homework assignment, we seek to construct a Bayesian regression model to predict vehicle price (PriceEuro; in Euros) based on range (Range_Km; in kilometers) and number of seats (Seats).

Questions
Prepare a written response to the following, using Overleaf. The assignment shouldn’t be longer than 10 (double-spaced, excluding title page, references, and appendices). Due Thurs., Feb. 17, at the beginning of the class period. Please submit the assignment as a PDF through CANVAS.

1.    Develop a MCMC algorithm to fit a Bayesian regression model using a normallikelihood, multivariate normal prior for the coefficients β, and normal prior for log(σ). Use a random walk proposal for log(σ) in the Metropolis-Hastings updates for log(σ).

2.    Conduct a Bayesian regression analysis based on the data set using vehicle priceas the response variable and the three sets of covariates below. Compare the 3 models using DIC.

(a)     Range_Km and Seats

(b)    Range_Km

(c)     Seats

3.    For the best performing model based on DIC, make inference about your findingsusing the associated MCMC sample.

4.    For a new EV that is not in the data set but has Range_Km = 500 and Seats = 4, predict the vehicle price using the best performing model you identified above.

References
• https://www.kaggle.com/kkhandekar/cheapest-electric-cars

More products