Question: A Bernoulli regression assumes Y; Bernoulli(mi), i = 1,...,n with free parameters (0, 3) specified by logit(xi) = a + Bx; where is a given

 A Bernoulli regression assumes Y; Bernoulli(mi), i = 1,...,n with free
parameters (0, 3) specified by logit(xi) = a + Bx; where is

A Bernoulli regression assumes Y; Bernoulli(mi), i = 1,...,n with free parameters (0, 3) specified by logit(xi) = a + Bx; where is a given covariate. [2] 1. Explain what is the saturated model and mill model. [2] 2. For the observed responses yi.... Yn, the fitted means are in ... fim. Find an expression for the residual deviance of the model in terms of the fitted means. (3) 3. The data file titanic.dat (accessible from MOODLE) contains information about 1046 passengers on RMS Titanic in 1912 and whether or not they survived the sinking of the ship survived = 1 or died = 0). In R, fit a Bernoulli regression model to the survival of passengers with the linear predictor: logit() = 00 + aj age (a) What is the fitted probability of surviving, Ji, for a 20 year old passenger? [1] (b) Evaluate a 95% confidence interval for the age co-efficient. Is age a good explanatory variable for predicting the survival of passengers? You may assume the regression coefficient estimator has a normal distribution with mean given by the true value of the regression coefficient and standard deviation approximated by the standard error from the R output. Consider instead the following Bernoulli regression model where the linear predictor is based on the sex of the passengers: logit (pi) = B female: + Bzmale; where female, is an indicator variable that is 1 if passenger i is female or otherwise, and likewise for the indicator variable males. Fit this regression model in R. Note that there is no intercept term. (c) What is the fitted probability of surviving for a male passenger? (d) Is this model adequate in describing the variability in the data at the 5% significance level? (1) 4. Let the indicator variable s be 1 if passenger i is male or otherwise, and the indicator variable s be 1 if passenger i is female or otherwise. An analysis proposes the following linear predictor: 1: = Bo + B25+ B28 Is this a good linear predictor? Justify your answer. (1) 5. State the linear predictor that contains age and passenger class. Explain any notation that you introduce. (Hint: To get started let a denote the vector of ages, with the ith entry corresponding to the age of the ith person in the data set, and let let clot be an indicator vector that is 1 in the ith position if the ith passenger is in Ist class, 0 otherwise. Construct other vectors as required carefully defining them and use these to formulate the linear predictor) (2) 6. State the linear predictor for age and passenger class with an interaction term between these two explanatory variables. (1) 7. Explain what effect including an age and class interaction term has on the linear predictor. [1] 8. Using R, fit a generalised linear model to the Titanic survivor data where the linear predictor contains passenger class, the gender of the passenger and the interaction between these explanatory variables. Write down the R command you used to fit this model. (1) 9. Estimate the probability for a female 1st class passenger to survive the sinking of the Titanic. Calculate a 95% confidence interval. 12) 10. Estimate the probability for a male 2nd class passenger to survive the sinking of the Titanic. [2] A Bernoulli regression assumes Y; Bernoulli(mi), i = 1,...,n with free parameters (0, 3) specified by logit(xi) = a + Bx; where is a given covariate. [2] 1. Explain what is the saturated model and mill model. [2] 2. For the observed responses yi.... Yn, the fitted means are in ... fim. Find an expression for the residual deviance of the model in terms of the fitted means. (3) 3. The data file titanic.dat (accessible from MOODLE) contains information about 1046 passengers on RMS Titanic in 1912 and whether or not they survived the sinking of the ship survived = 1 or died = 0). In R, fit a Bernoulli regression model to the survival of passengers with the linear predictor: logit() = 00 + aj age (a) What is the fitted probability of surviving, Ji, for a 20 year old passenger? [1] (b) Evaluate a 95% confidence interval for the age co-efficient. Is age a good explanatory variable for predicting the survival of passengers? You may assume the regression coefficient estimator has a normal distribution with mean given by the true value of the regression coefficient and standard deviation approximated by the standard error from the R output. Consider instead the following Bernoulli regression model where the linear predictor is based on the sex of the passengers: logit (pi) = B female: + Bzmale; where female, is an indicator variable that is 1 if passenger i is female or otherwise, and likewise for the indicator variable males. Fit this regression model in R. Note that there is no intercept term. (c) What is the fitted probability of surviving for a male passenger? (d) Is this model adequate in describing the variability in the data at the 5% significance level? (1) 4. Let the indicator variable s be 1 if passenger i is male or otherwise, and the indicator variable s be 1 if passenger i is female or otherwise. An analysis proposes the following linear predictor: 1: = Bo + B25+ B28 Is this a good linear predictor? Justify your answer. (1) 5. State the linear predictor that contains age and passenger class. Explain any notation that you introduce. (Hint: To get started let a denote the vector of ages, with the ith entry corresponding to the age of the ith person in the data set, and let let clot be an indicator vector that is 1 in the ith position if the ith passenger is in Ist class, 0 otherwise. Construct other vectors as required carefully defining them and use these to formulate the linear predictor) (2) 6. State the linear predictor for age and passenger class with an interaction term between these two explanatory variables. (1) 7. Explain what effect including an age and class interaction term has on the linear predictor. [1] 8. Using R, fit a generalised linear model to the Titanic survivor data where the linear predictor contains passenger class, the gender of the passenger and the interaction between these explanatory variables. Write down the R command you used to fit this model. (1) 9. Estimate the probability for a female 1st class passenger to survive the sinking of the Titanic. Calculate a 95% confidence interval. 12) 10. Estimate the probability for a male 2nd class passenger to survive the sinking of the Titanic. [2]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!