advertisement

Stat 960:587 Homework No. 2 Due 3/20/2019 Programming: R or Python Problem 1. Car purchase. A marketing research firm was engaged by an automobile manufacturer to conduct a pilot study to examine the feasibility of using logistic regression for ascertaining the likelihood that a family will purchase a new car during the next year. A random sample of 33 suburban families was selected. Data on annual family income (X1, in thousand dollars) and the current age of the oldest family automobile (X2, in years) were obtained. A follow-up interview conducted 12 months later was used to determine whether the family actually purchased a new car (Y = 1) or did not purchase a new car (Y = 0) during the year. You can find all the data in the CarPurchaseData.txt attachment. i Xi1 Xi2 Yj 1 32 3 0 2 45 2 0 3 60 2 1 ... ... ... ... 31 21 3 0 32 32 5 1 33 17 1 0 Multiple logistic regression model with two predictor variables in first-order terms is assumed to be appropriate. a. Find the maximum likelihood estimates of βo, β1, and β2. State the fitted response function. b. Obtain exp(b1) and exp(b2) and interpret these numbers. c. What is the estimated probability that a family with annual income of $50 thousand and an oldest car of 3 years will purchase a new car next year? Problem 2. Knight & Skagen (1988) collected the data shown in the table during a field study on the foraging behavior of wintering Bald Eagles in Washington State, USA. The data concern 160 attempts by one (pirating) Bald Eagle to steal a chum salmon from another (feeding) Bald Eagle. The abbreviations used are: Number of successful attempts 17 29 17 20 1 15 0 1 L = large S = small A = adult I = immature Total number of attempts 24 29 27 20 12 16 28 4 Size of pirating eagle L L L L S S S S Age of pirating eagle A A I I A A I I Size of feeding eagle L S L S L S L S Report on factors that explain the success of the pirating attempt and give a prediction formula for the probability of success Problem 3. The following data are part of a survey by Dr Mutch of low-weight births in Scotland between 1981 and 1988. The table refers to 661 children with birth weights between 650g and 1749g all of whom survived for at least one year. The variables of interest are: Cardiac: mild heart problems of the mother during pregnancy; Comps: gynaecological problems during pregnancy; Smoking: mother smoked at least one cigarette per day during the first 6 months of pregnancy; BW: was the birth weight less than 1250g? Cardiac Comps Smoking BW Analyse this table. Yes No Yes Yes No Yes No Yes No 10 25 12 15 7 5 22 19 Yes Yes No 18 12 10 12 No No Yes No 42 45 202 205 Problem 4. Refer to Car purchase, a. To assess the appropriateness of the logistic regression function, form three groups of 11 cases each according to their fitted logit values πˆ ' . Plot the estimated proportions pj against the midpoints of the πˆ ' intervals. Is the plot consistent with a response function of monotonic sigmoidal shape? Explain. b. Obtain the deviance residuals and present them in an index plot. Do there appear to be any outlying cases? c. Construct a half-normal probability plot of the absolute deviance residuals. Do any cases here appear to be outlying?