Professional Documents
Culture Documents
BADM
Assignment 2
Question
A local health clinic sent flyers to encourage everyone, but especially older persons at high risk of complications, to get flu shot in time for protection against an expected flu epidemic. In a pilot follow-up study, 50 clients were randomly selected and asked whether they actually received a flu shot. This serves as the binary dependent variable (SHOT). In addition, data were collected on their age (AGE) and on a health awareness index (HAI), for which higher values indicate greater awareness. A client who received a flu shot was coded SHOT=1, and a client who did not receive a shot was coded SHOT=0. OUTPUT (LOGISTIC REGRESSION) Logistic Regression Results
The LOGISTIC Procedure Model Information
Data Set WORK.SORTTEMPTABLESORTED Response Variable shot Number of Response Levels2 Model binary logic Optimization Technique Fisher's scoring Number of Observations Read 50 Number of Observations Used50
Response Profile Ordered Total Valueshot Frequency
10 21
29 21
AIC SC -2 Log L
Score Wald
26.4760 2 11.6027 2
<.0001 0.0030
Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq
Odds Ratio Estimates 95% Wald Effect Point Estimate Confidence Limits
age hai
1.248 1.226
1.079 1.084
1.444 1.386
1. Run a model with both predictors, HAI and AGE. What is the -2Log Likelihood associated with the two-predictor model? Ans. With two predictors, the -2LL is now 32.416. 2. For the two-predictor model, write the regression equation in three forms
i. log (p/1-p) = B0 + B1*HAI + B2*AGE log (p/1-p) = -21.5821 + .2218 AGE + .2035HAI ii. Odds = eB0 + B1 * AGE + B2 * HAI) (Odds) = e (-21.5821 + 0.2218 * AGE + 0.2035 * HAI)
iii. p = 1/ (1+ e-(B0+ B1 * AGE + B2 * HAI)) p= 1/ (1+e-(-21.5821 + 0.2218 * AGE + 0.2035 * HAI))
3. What is the interpretation of the value of Beta2 (for AGE) in terms of the change in Odds? For a one unit increase in AGE we expect, on average, that the odds will become 1.2483 times their value before the one unit increase (holding all else constant). That is, we expect a 24.83% increase in the odds of getting a shot for each unit increase in AGE. 4. For the subject with ID#40, compute the values of [log (odds)], (odds), and p. What prediction do all of these lead to for this subject? Is your prediction correct for this subject? Data: Case # 40: SHOT=1; AGE=57; HAI=54 i. [log (odds)]' = -21.5821 + .2218AGE + .2035HAI = -21.5821 + .2218(57) + .2035(54) = 2.0495 this is above 0, so we predict shot (SHOT =1). ii. (odds)' = e (-21.5821 + .2218AGE + .2035HAI) = e (2.0495) = 7.764 this is above 1, so we predict shot. (SHOT = 1) iii. P' = 1/ [1 + e-(-21.5821 + .2218AGE + .2035HAI)] = 1/ [1 + e-(2.0495)] = 1/ [1 + .1288] = .8859 This is above .5, so we predict shot (SHOT = 1) Hence, using two predictor model, we predict a shot. Also from the data, we have SHOT = 1. Since both the predictions (from the model as well as from the data) match, we can say that our predictions are correct for this subject.
5. Perform Discriminant Analysis with Prior Probabilities set as equal. Compare the Misclassification rates from both the Logistic Regression and Discriminant Analysis models. Discriminant Analysis Results
The DISCRIM Procedure
5 Total Sample Size 0DF Total 49 Variables 2DF Within Classes 48 Classes 2DF Between Classes 1 Number of Observations Read 50 Number of Observations Used50
Class Level Information Variable Prior shotName Frequency Weight Proportion Probability
00 11
8.56706
Generated by the SAS System ('Local', XP_PRO) on July 26, 2013 at 1:23:00 PM
1 4.43542
Priors
Error Count Estimates for shot 0 1 Total
* Misclassified observation
Priors
Error Count Estimates for shot 0 1 Total