Set up a metropolis-hastings algorithm with the likelihood


In 1986, the space shuttle Challenger exploded during takeoff, killing the seven astronauts aboard. The explosion was the result of an O-ring failure, a splitting of a ring of rubber that seals the parts of the ship together. The accident was believed to have been caused by the unusually cold weather (31 o F or 0 o C) at the time of launch, as there is reason to believe that the O-ring failure probabilities increase as temperature decreases. Data on previous space shuttle launches and O-ring failures is given in the dataset challenger provided with the mcsm package. The first column corresponds to the failure indicators yi and the second column to the corresponding temperature xi (1 ≤ i ≤ 24).

1. Fit this dataset with a logistic regression, where

P(Yi=1|xi) = p(xi) = exp(α+βxi)/1+exp(α+βxi),

using R glm function, as illustrated. Deduce the MLEs for α and β, along with standard errors.

2. Set up a Metropolis-Hastings algorithm with the likelihood as target using an exponential candidate for α and a Laplace (double-exponential) candidate for β.

3. Generate 5000 iterations of the Markov chain and construct a picture similar to Figure to evaluate the variability of p(x) minus the observation dots.

4. Derive from this sample an estimate of the probability of failure at 60o, 50o, and 40o F along with a standard error.

448_Figure 3.jpg

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: Set up a metropolis-hastings algorithm with the likelihood
Reference No:- TGS02155104

Expected delivery within 24 Hours