HW 17 Stat 705 Fall 2015 Assigned Monday 11/30/15 DUE Wednesday 12/9/15 In HW12, you previously analyzed the dataset "Insurance" from the MASS package using linear regression techniques.Now we will consider the data as being subject to a Poisson model, Claims ~ Poisson(Holders * lambda) (*) (A) Find the MLE for lambda, and also note that if lambda has a prior density Gamma(1,0.1), then the posterior density is proportional to lambda^(sum(Y_i)) * exp(-lambda*(0.1+sum(X_i))) and is therefore again Gamma, where Y_i = Claims[i] and X_i = Holders[i]. NOTE that the MLE for lambda in this problem has a closed-form formula, which you will want to find for part (C). ------------ (B) For this dataset, implement 4 methods to simulate (arbitrarily many) "pseudo"-datasets (Y_1,...,Y_{64}), as follows.For methods (1) and (2), the vector of numbers (X_1,...,X_{64}) of Holders is regarded as fixed (nonrandom). (1) Generate the Y pseudo-sample via parametric bootstrap. (2) Generate the Y sample by drawing a random parameter lambda from the posterior density of lambda given the observed Y-data in "Insurance", and then sample new batches of 64 Y's (for the same fixed X's) using the Poisson model. (3) Generate a nonparametric bootstrap sample of X's (by iid sampling with replacement fom the given numbers { Holders[1], ..., Holders[64] }, and then a parametric bootstrap of Y's conditionally given X's using the model (*) with the MLE-estimated parameter lambda . (4) Generate a nonparametric bootstrap sample of (X_i,Y_i) pairs (iid sampled with replacement from the set of 64 pairs). ------------ (C) Apply the functions you wrote in generating pseudo-samples 4 for methods (1)-(4), with 1000 replications each, to find a 90% two-sided confidence interval [called "credible interval" in the Bayesian setting] for lambda based on the original dataset. The interpretations of these intervals are slightly different when generated by the 4 methods: give the best verbal description you can for how to interpret each one. NOTE: your intervals should ideally allow probability 0.05 of falling below the true value and 0.05 of falling above it.