Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Consider the data in table 1 , showing the distance needed to stop (y,ft) when a car travels at a particular speed (x,mph) and

image text in transcribed
image text in transcribed
3. Consider the data in table 1 , showing the distance needed to stop (y,ft) when a car travels at a particular speed (x,mph) and brakes. It is thought that a good model for this dataset is a quadratic model yih=a+bxi+cxi2+iji=1,,k;j=1,,ni. If we assume that ijN(0,2), independent, then the likelihood function is (21)N/2exp(221ij(yijabxicxi2)2) where N=ini. Table 1: Braking distances of 50 cars, x= speed (mph),y= distance to stop (feet). (a) Fit the model using JAGS. Assume normal prior distributions for the coefficients of the regression and an inverse-gamma prior distribution for the variance of the error. Give reasonable initial values for each of the parameters. Include the R code for the algorithm in your answer. (b) Plot the posterior distribution of the parameters, compute the posterior mean, median and the 95% credible interval for each regression coefficient. (c) Report trace plots of each parameter and discuss convergence. (d) Make a plot of the estimated regression curve from the MCMC analysis using the empirical averages of the parameters a,b and c. . 3. Consider the data in table 1 , showing the distance needed to stop (y,ft) when a car travels at a particular speed (x,mph) and brakes. It is thought that a good model for this dataset is a quadratic model yih=a+bxi+cxi2+iji=1,,k;j=1,,ni. If we assume that ijN(0,2), independent, then the likelihood function is (21)N/2exp(221ij(yijabxicxi2)2) where N=ini. Table 1: Braking distances of 50 cars, x= speed (mph),y= distance to stop (feet). (a) Fit the model using JAGS. Assume normal prior distributions for the coefficients of the regression and an inverse-gamma prior distribution for the variance of the error. Give reasonable initial values for each of the parameters. Include the R code for the algorithm in your answer. (b) Plot the posterior distribution of the parameters, compute the posterior mean, median and the 95% credible interval for each regression coefficient. (c) Report trace plots of each parameter and discuss convergence. (d) Make a plot of the estimated regression curve from the MCMC analysis using the empirical averages of the parameters a,b and c

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Management And Cost Accounting Tools And Concepts In A Central European Context

Authors: Andreas Taschner, Michel Charifzadeh

1st Edition

3527508228, 978-3527508228

More Books

Students also viewed these Accounting questions