W17_final_exam_solutions_updatedforW18students.pdf - Solutions for PSTAT 127 Final Exam Winter 2017 March 20 Clear working must be shown to receive

W17_final_exam_solutions_updatedforW18students.pdf -...

• Test Prep
• 11
• 100% (21) 21 out of 21 people found this document helpful

This preview shows page 1 - 3 out of 11 pages.

Solutions for PSTAT 127 Final Exam, Winter 2017, March 20 Clear working must be shown to receive credit. The maximum possible score is 105, with five of these points counting as extra credit (i.e. 100 points = 100% for final exam grade calculation) . There are 5 questions. Answer all questions. Recall that form of the pmf/pdf for the exponential family of distributions used in class is:f(y;θ, φ) = exp-b(θ)a(φ)+c(y, φ)whereθis canonical parameter,andφis dispersion parameter.1. [20 points] The mtcars data set is used in both questions 1 and 2, with slightly different subsets of variables. Youmay use different notation in the two questions - and must clearly define all notation used within each question.Themtcarsdata set in R contains data from the 1974 Motor Trend US magazine, and comprises fuel consumptionand several aspects of automobile design and performance for 32 automobiles (1973-74 models).In question 1, we consider the following variables:mpg = the miles per gallon fuel consumption (a strictly positive continuous variable)am = transmission type; with two possible values: 1 = manual transmission, and 0 = automatic transmissionhp = gross horsepower (a continuous variable)Consider the following glm commands:fit1 <- glm( mpg ~ am * hp, family = gaussian(link="identity"), data = mtcars )fit2 <- glm( mpg ~ am + hp, family = gaussian(link="identity"), data = mtcars )fit3 <- glm( mpg ~ am + hp, family = gaussian(link="log"), data = mtcars )(a) Write out the model and assumptions corresponding tofit1, specifying all three components of the GLM,with clearly defined notation that you then can use throughout this question. 1
(b) Write out only that component of thefit2model and assumptions that differs from those offit1. (c) Is one of the modelsfit1andfit2nested within the other? Explain your answer using your model notation.