Azen & Walker
Solutions
2
Chapter 1 1.1 Several answers are possible, depending on justification provided. a. Ordinal, interval or ratio can all be justified with explanation. b. Ordinal is most probable, assuming there are more than two choices. c. Ordinal is most probable. 1.2 Several answers are possible, depending on justification provided. a. Ordinal or interval are most likely; should be justified with explanation. b. Nominal (no meaningful ordering). c. Ratio (zero represents no income). 1.3 Answers can vary; scales should be described and match the level of measurement given in the answers. For example: a. Dependent Variable = Mathematics proficiency measured by levels of proficiency, ordinal scale (e.g., advanced, proficient, basic, and minimal); Independent Variable = Sex measured by one demographic question, nominal scale (e.g., male or female). b. Dependent Variable = Satisfaction with Life measured by a multiple item survey interval scale (e.g., each item measures on a Likert scale); Independent Variable = Relationship Status measured by one dichotomous demographic question, nominal scale (e.g., single, married, divorced, etc.). c. Dependent Variable = Body Image measured by a multiple item survey, interval scale (e.g., each item measures on a Likert scale); Independent Variable = Sex measured by one demographic question, nominal scale (e.g., male or female). d. Dependent Variable = Level of Education measured by number of years attended school, ratio scale; Independent Variable = Religious Affiliation measured by one demographic survey item, nominal scale (e.g., Christian, Jewish, Muslim, Other). 1.4 Answers can vary; scales should be described and match the level of measurement given in the answer. For example: a. Dependent Variable = Weight measured in kilograms or pounds, ratio scale; Independent Variable = Country of residence measured by a demographic question, nominal scale (e.g., living in U.S. or not). b. Dependent Variable = Cholesterol level measured by a blood test, ratio scale (e.g., amount of cholesterol in blood); Independent Variable = Sex measured by one demographic question, nominal scale (e.g., male or female). c. No distinction between dependent and independent variables. Political Affiliation measured by a demographic question, nominal scale (e.g., Democratic, Republican, Other); Sex measured by one demographic question, nominal scale (e.g., male or female). d. No distinction between dependent and independent variables. Grades in High School measured by GPA, ratio scale (interval or ordinal also possible); Amount of sleep measured by a survey item that asks respondents the number of hours they sleep each night, ratio scale.
Information Classification: General
Azen & Walker
Solutions
3
1.5 Answers can vary; scales should be described and match the level of measurement given in the answer. For example: a. The dependent variable in this scenario is presidential choice, which is a nominal variable. The independent variable in this scenario is income. If income is measured by the gross annual income, then it would be a ratio variable. However, if income is measured by a survey item that categorizes income (e.g., < 9,999; $10,000 to $29, 999, $30,000 to $49,999, etc.) then it is an ordinal variable. Regardless, since the dependent variable is a nominal variable, procedures for analyzing categorical data are needed. b. The dependent variable in this scenario is income, and the independent variable in this scenario is presidential choice, which is a nominal variable. If income is measured by gross annual income, then it would be a ratio variable and procedures for analyzing categorical data are not needed. However, if income is measured by a survey item that categorizes income (e.g., < 9,999; $10,000 to $29, 999, $30,000 to $49,999, etc.) then it is an ordinal variable and procedures for analyzing categorical data are needed. c. The dependent variable in this scenario is fat content in diet. If this is measured by having participants track their meals for a week and then counting up the grams of fat consumed on an average day, this is a ratio variable. The independent variable is whether or not one has had a heart attack, which is a nominal variable. Because the dependent variable is a ratio variable, procedures for analyzing categorical data are not needed. d. The dependent variable is whether or not one has had a heart attack, which is a nominal variable. The independent variable in fat content in diet, which can be measured as described in 1.5(c) and is a ratio variable. Because the dependent variable is a nominal variable, procedures for analyzing categorical data are needed. 1.6 Answers can vary; scales should be described and match the level of measurement given in the answer. For example: a. The dependent variable in this scenario is whether or not one graduated from high school, which is a dichotomous nominal variable. The independent variable in this scenario is grade point average, which can be considered a ratio variable. Because the dependent variable is a nominal variable, procedures for analyzing categorical data are needed. b. The dependent variable in this scenario is grade point average, which can be considered a ratio (or interval) variable. Therefore, procedures for analyzing categorical data are not needed. c. The dependent variable in this scenario is annual income. The independent variable is whether or not a respondent attended college, which is a nominal (dichotomous) variable. If income is measured by gross annual income, then it would be a ratio variable and procedures for analyzing categorical data are not needed. But, if income is measured by a survey item that categorizes income (e.g., < 9,999; $10,000 to $29, 999, $30,000 to $49,999, etc.) then it is an ordinal variable and procedures for analyzing categorical data are needed. d. The dependent variable in this scenario is whether or not one attended college, which is a nominal (dichotomous) variable. Therefore, regardless of the manner in which income is measured, procedures for analyzing categorical data are needed.
Information Classification: General
Azen & Walker
Solutions
4
1.7 Answers can vary; scales should be described and match the level of measurement given in the answer. For example: a. The dependent variable in this scenario is reading proficiency, which is typically measured as an ordinal variable (for example, when reading proficiency is differentiated into four categories such as minimal, basic, proficient, and advanced, as is commonly done). Thus, procedures for analyzing categorical data are needed. b. The dependent variable in this scenario is income and the independent variable is gender. If income is measured by gross annual income, then it would be a ratio variable and procedures for analyzing categorical data are not needed. In this case an ANOVA analysis could be used to determine if the average annual income differs for males and females. However, if income is measured by a survey item that categorizes income (e.g., < 9,999; $10,000 to $29, 999, $30,000 to $49,999, etc.) then it is an ordinal variable and procedures for analyzing categorical data are needed. c. The dependent variable in this scenario is once again income. The independent variable is level of education. Both variables can be measured as either categorical or continuous variables. The following table provides the correct analytical procedure for all four possible combinations: Measurement of Income Measurement of Education Analytical Procedure Ratio Ratio Regression Ratio Ordinal ANOVA Ordinal Ratio Categorical Procedure Ordinal Ordinal Categorical Procedure d. In this scenario both variables are categorical and thus procedures for analyzing categorical data are needed. 1.8 Answers will vary.
Information Classification: General
Azen & Walker
Solutions
Chapter 2 2.1 This probability can be determined using the hypergeometric distribution: N = 25, n = 5, m = 12, k = 0 P(Y =0) =
(
12 25−12 12! 13! )( ) ( )( ) 0 5−0 0!12! 5!8! = = 0.024 25 25! ( ) ( ) 5 5!20!
2.2 a. This probability can be determined using the hypergeometric distribution: N = 20, n = 2, m = 15, k = 2 P(Y =2) =
(
15! 5! 15 20−15 )( ) ( )( ) 2!13! 0!5! 2 2−2 = = 0.55 20 20! ( ) ( ) 2 2!18!
b. This probability can be determined using the hypergeometric distribution: N = 20, n = 2, m = 15, k = 1 P(Y =1) =
(
15 20−15 15! 5! )( ) ( )( ) 1 2−1 1!14! 1!4! = = 0.39 20 20! ( ) ( ) 2 2!18! 𝑛𝑚
c. Expected value = 𝑁 =
(2)(15) 20
= 1.5
2.3 This probability can be determined using the hypergeometric distribution: N = 100, n = 6, m = 48, k = 3 P(Y =3) =
(
48 100−48 48! 52! ( )( ) )( ) 3 6−3 3!45! 3!49! = = 0.32 100 100! ( ) ( ) 6 6!94!
2.4 This probability can be determined using the hypergeometric distribution: N = 5, n = 1, m = 2, k = 1 2 5−2 ( )( )
(
2!
)(
3!
)
P(Y =1) = 1 51−1 = 1!1! 5! 0!3! = 0.4 ( ) 1
( ) 1!4!
2.5 This probability can be determined using the hypergeometric distribution: N = 20, n = 1, m = 15, k = 1 P(Y =1) =
Information Classification: General
(
15! 5! 15 20−15 )( ) ( )( ) 1!14! 0!5! 1 1−1 = = 0.75 20 20! ( ) ( ) 1 1!19!
5
Azen & Walker
Solutions
6
2.6 This probability can be determined using the binomial distribution: n = 10, k = 3, p = 0.67 10 𝑃(𝑌 = 3) = ( ) (0.67)3 (0.33)7 = 0.0154 3 2.7 For a multiple choice test item with four response options, the probability of obtaining the correct answer by simply guessing is 0.25. a. n = 20, k = 15, p = 0.25, and q = 0.75 20 P(Y = 15) = 0.2515 (0.75) 5 < 0.001 15 b. The expected number of items the student will correctly answer can be determined by finding the mean of the distribution: = np = 20(0.25) = 5 2.8 The probability that an entering college freshman will obtain his or her degree in four years is 0.4. What is the probability that at least one out of five admitted freshmen will graduate in four years? This probability can be determined using the Binomial distribution and the laws of probability: n = 5, k = 0, p = 0.4, and q = 0.6 5 P(Y = 0) = 0.4 0 (0.6) 5 0.08 0 P(Y ≥ 1) = 1 - P(Y = 0) = 1 – 0.08 = 0.92 2.10 On average, ten people enter a particular bookstore every five minutes. a. What is the probability that only four people enter the bookstore in a five minute interval? = k = 4 e −10 10 4 0.454 P(Y = 4) = = 0.019 4! 24 b. What is the probability that eight people enter the bookstore in a five minute interval? = k = 8 e −10 10 8 P(Y = 8) = 0.113 8! 2.11 Telephone calls are received by a college switchboard at the rate of four calls every three minutes. What is the probability of obtaining five calls in a three minute interval? = k=5 e −4 4 5 P (Y = 5) = 0.156 5! 2.12 Open ended; answers will vary.
Information Classification: General
Azen & Walker
Solutions
7
Chapter 3 3.1 a. p = 13/20 = 0.65 b. H0: program did not change proficiency rate, so after program it is still 40%; = 0.4 H1: program helped the proficiency rate, so after program it is higher; > 0.4 Using the binomial distribution with n = 20 and = 0.4, the one-tailed p-value is: P(Y ≥ 13) = P(Y=13) + P(Y=14) + P(Y=15) + P(Y=16) + P(Y=17) + P(Y=18) + P(Y=19) + P(Y=20) = .015 +.005 +.001 + 0 = 0.021. Therefore, the new teaching approach significantly improved teaching (using a onetailed test at the .05 significance level). 3.2 a. p = 2/50 = 0.04 b. H0: heart disease rate with a low-fat diet is the same as it is in the general population, or = 0.10 H1: heart disease rate with a low-fat diet is lower than it is in the general population, or < 0.10 Using the binomial distribution with n = 50 and = 0.1, the one-tailed p-value is: P(Y ≤ 2) = P(Y=2) + P(Y=1) + P(Y=0) = 0.112. Therefore, heart disease rate with a low-fat diet is not significantly different than the rate of 10% in the general population (using a one-tailed test at the .05 significance level). 3.3
z = (0.65 – 0.4)/√(0.4 ∗ 0.6)/20 = 0.25/0.11 = 2.28. p-value (for the one-tailed test) = 0.011 Therefore, the new teaching approach significantly improved teaching (using a one-tailed test at the .05 significance level).
3.4
z = (0.04 – 0.1)/√(0.1 ∗ 0.9)/50 = -1.41. p-value (for the one-tailed test) = 0.079 Therefore, the heart disease rate with a low-fat diet is not significantly different than the rate of 10% in the general population (using a one-tailed test at the .05 significance level).
3.5
Although the conclusions are the same, the p-value of the exact test, .021, is larger than the p-value of the score test, .011, showing that the exact test is typically more conservative (i.e., less likely to reject the null hypothesis) than the score test.
3.6
Although the conclusions are the same, the p-value of the exact test, .112, is larger than the p-value of the score test, .079, showing that the exact test is typically more conservative (i.e., less likely to reject the null hypothesis) than the score test.
3.7
H0: proficiency rate after program is 40%; = 0.4 H1: proficiency rate after program is not 40%; ≠ 0.4 20 Under H0: π = 0.4, L0 = P(Y =13) = 0.413 (1 − 0.4) ( 20−13) = 0.015. 13
Information Classification: General
Azen & Walker
Solutions
8
20 Given p = 0.65, L1 = P(Y =13) = 0.6513 (1 − 0.65) ( 20−13) = 0.184. 13 2 G = 5.08, df = 1, p-value = 0.024. Therefore, p = 0.65 is significantly higher than π = 0.4 and the new teaching approach significantly improved teaching (using a two-tailed test at the .05 significance level). 3.8 a. Null hypothesis: π = 0.5. That is, Candidate X will not receive a majority of the votes. Alternative hypothesis: π > 0.5. That is, Candidate X will receive a majority of the votes. b. The p-value from the score test is .0023 (one-tailed) c. The p-value from the Wald test is .0019 (one-tailed) d. The null hypothesis is rejected (using a two-tailed test at the .05 significance level) and we can conclude that the proportion of votes for Candidate X will receive significantly more than 50% of the votes. 3.9
p(1 - p)/n = .6(1 - .6)/200 = 0.0346. a. 0.6 ± 1.96(0.0346) = [0.532, 0.668]. With 95% confidence, candidate X will receive between 53.2% and 66.8% of the votes. b. 0.6 ± 2.58(0.0346) = [0.511, 0.689]. With 99% confidence, candidate X will receive between 51.1% and 68.9% of the votes. c. Based on both confidence intervals, because 50% is outside and below the interval it is fair to say that candidate X is likely to receive more than 50% of the votes.
3.10 a. 2 = [(25-20)2/20] + [(30-40)2/40] + [(30-20)2/20] + [(14-15)2/15] + [(1-5)2/5] = 1.25 + 2.5 + 5.0 + 0.067 + 3.2 = 12.02. With df = 4, this grade distribution is significantly different than it had been in previous years (p = 0.017). b. The grade of C contributed the greatest amount and D contributed least to the test statistic. This indicates that the proportion in the C category has changed the most and the proportion in the D category has changed the least from the previous distribution.
3.11 a. The null hypothesis is that the four issues are equally important so each will have a probability of 0.25 (and expected frequency of 0.25*200 = 50). The alternative hypothesis is that the four issues are unequally important so some of the probabilities will be higher and some lower than 0.25. b. 2 = [(80-50)2/50] + [(40-50)2/50] + [(65-50)2/50] + [(15-50)2/50] = 49 With df = 3, the observed distribution is significantly different what would be expected under equal importance (p < .0001) so voters do not place equal importance on these issues. 3.12 a. G2 = 2(5.58 – 8.63 + 12.16 – 0.97 – 1.61) = 2(6.54) = 13.07.
Information Classification: General
Azen & Walker
Solutions
9
With df = 4, this grade distribution is significantly different than it had been in previous years (p = 0.011). b. The grade of C contributed the greatest amount and D contributed least to the test statistic. This indicates that the proportion in the C category has changed the most and the proportion in the D category has changed the least from the previous distribution. 3.13 a. The null hypothesis is that the four issues are equally important so each will have a probability of 0.25 (and expected frequency of 0.25×200 = 50). The alternative hypothesis is that the four issues are unequally important so some of the probabilities will be higher and some lower than 0.25. b. G2 = 55.33 With df = 3, the observed distribution is significantly different what would be expected under equal importance (p < .0001) so voters do not place equal importance on these issues. 3.14
The null hypothesis would be that the proficient (yes) proportion is 0.40, so for 20 students this would imply an expected frequency distribution with 8 proficient and 12 not proficient. The observed frequency distribution is 13 proficient and 7 not proficient. Thus the test statistic is 2 = 5.21, df = 1, and p = 0.02, indicating that the distributions are significantly different and thus proficiency is significantly higher in the data than what was hypothesized under the null hypothesis.
Information Classification: General
Azen & Walker
Solutions
10
Chapter 4 4.1
NES
No Yes
Proficient No 35 93 128
Yes 5 67 72
40 160 200
a. Overall odds of proficiency = (72/200)/(128/200) = 0.36/0.64 = 0.5625; the probability of proficiency is 56% of (so lower than) the probability of nonproficiency. b. Odds of proficiency for NES = (67/160)/( 93/160) = 0.42/0.58 = 0.72 c. Odds of proficiency for non-NES = (5/40)/( 35/40) = 0.125/0.875 = 0.14 d. Odds ratio = (35)(67)/(5)(93) = 5.04; the odds that a native English speaker will be proficient are about 5 times the odds that a non-native speaker will be proficient. 4.2
95% CI for odds ratio: 1 1 1 1 1 1 1 1 𝑆𝐸ln(𝜃̂) = + + + = + + + = 0.504. n11 n12 n21 n22 35 5 93 67 ln(𝜃̂) ± 𝑧𝐶𝐿 𝑆𝐸ln(𝜃̂) = ln(5.04) ± 1.96(0.504) = 1.618 ± 0.988 = [0.63, 2.61] [exp(0.63), exp(2.61)] = [1.877, 13.549]. With 95% confidence, in the population the odds that a native English speaker will be proficient are between 1.9 and 13.5 times the odds that a non-native speaker will be proficient.
4.3
H0: There is no association between proficiency and NES in the population, or the odds ratio = 1. Since the 95% confidence interval (problem 4.2) did not include 1, there is a significant association between proficiency and NES status in the population. Alternatively, 2 = 11.98, df = 1, p = .0005.
4.4
SAS program and relevant output: data AWch4ex1; input NES $ Profic $ count; datalines; n n 35 n y 5 y n 93 y y 67; proc freq data=AWch4ex1 order=data; weight count; tables NES*Profic /nocol norow nopercent expected deviation cellchi2 chisq relrisk; run; Statistics for Table of NES by Profic Statistic DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 1 11.9846 0.0005 Likelihood Ratio Chi-Square 1 13.6624 0.0002
Information Classification: General
c
Azen & Walker
Solutions
11
Estimates of the Relative Risk (Row1/Row2) Type of Study Value 95% Confidence Limits ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Case-Control (Odds Ratio) 5.0430 1.8771 13.5485 Sample Size = 200
4.5
a
b
Answers will vary.
4.6 Statistics for Table of Colds by VitC Statistic DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 2 10.5667 0.0051 Likelihood Ratio Chi-Square 2 10.7770 0.0046 Sample Size = 100
a. 2 = 10.57, df = 2, p = .0051. b. G2 = 10.78, df = 2, p = .0046. c. There is a statistically significant association between the incidence of colds and whether one regularly takes Vitamin C. 4.7
Relevant SAS output: Colds
VitC
Frequency ‚ Expected ‚ Deviation ‚ Cell Chi-Square‚y ‚n ‚ Total ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ few ‚ 32 ‚ 16 ‚ 48 ‚ 24 ‚ 24 ‚ ‚ 8 ‚ -8 ‚ ‚ 2.6667 ‚ 2.6667 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ some ‚ 13 ‚ 27 ‚ 40 ‚ 20 ‚ 20 ‚ ‚ -7 ‚ 7 ‚ ‚ 2.45 ‚ 2.45 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ many ‚ 5 ‚ 7 ‚ 12 ‚ 6‚ 6‚ ‚ -1 ‚ 1 ‚ ‚ 0.1667 ‚ 0.1667 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Total 50 50 100
Standardized residuals (for above table): r11 = 3.2, r12 = -3.2, r21 = -2.9, r22 = 2.9, r31 = -0.6, r32 = 0.6. a. The cells associated with "Few" colds show the largest deviations both in terms of residuals and contributions to the chi-squared statistic. The cells associated with "Many" colds show the smallest deviations both in terms of residuals and contributions to the chi-squared statistic.
Information Classification: General
Azen & Walker
Solutions
12
b. Since the total chi-squared statistic is 10.6, the contributions in the "few" and "some" cells are relatively large (about a quarter of the statistic). The residuals for the "few" and "some" cells are also relatively large because their expected values are larger than 2 standard deviations from the observed values. 4.8
Marital status and attitude towards life: a. Pearson X2 = 39.22 (G2 = 31.91), df = 8, p < .0001 so the association is statistically significant. b. Large contributions to X2 come from the cells widowed/dull (13.1) and separated/dull (11.7). Both have observed counts that are higher than what would be expected under independence. Large standardized residuals come from the cells married/dull (-3.2), widowed/dull (4.0), separated/dull (3.6), never/exciting (2.3), never/routine (-2.0), widowed/exciting (-2.5). Table of marital by lifeatt marital
lifeatt
Frequency ‚ Expected ‚ Deviation ‚ Cell Chi-Square‚dull ‚routine ‚exciting‚ Total ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ married ‚ 21 ‚ 241 ‚ 251 ‚ 513 ‚ 33.479 ‚ 236.41 ‚ 243.11 ‚ ‚ -12.48 ‚ 4.5873 ‚ 7.8916 ‚ ‚ 4.6514 ‚ 0.089 ‚ 0.2562 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ widowed ‚ 17 ‚ 54 ‚ 40 ‚ 111 ‚ 7.244 ‚ 51.154 ‚ 52.602 ‚ ‚ 9.756 ‚ 2.8464 ‚ -12.6 ‚ ‚ 13.139 ‚ 0.1584 ‚ 3.0193 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ divorced ‚ 10 ‚ 74 ‚ 65 ‚ 149 ‚ 9.7239 ‚ 68.666 ‚ 70.61 ‚ ‚ 0.2761 ‚ 5.3343 ‚ -5.61 ‚ ‚ 0.0078 ‚ 0.4144 ‚ 0.4458 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ separate ‚ 6 ‚ 11 ‚ 8 ‚ 25 ‚ 1.6315 ‚ 11.521 ‚ 11.847 ‚ ‚ 4.3685 ‚ -0.521 ‚ -3.847 ‚ ‚ 11.697 ‚ 0.0236 ‚ 1.2494 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ never ‚ 11 ‚ 79 ‚ 108 ‚ 198 ‚ 12.922 ‚ 91.247 ‚ 93.831 ‚ ‚ -1.922 ‚ -12.25 ‚ 14.169 ‚ ‚ 0.2858 ‚ 1.6438 ‚ 2.1395 ‚ ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Total 65 459 472 996
4.9 The odds of finding life exciting rather than routine for those who are married = 251/241 = 1.04, and the odds for those who were never married = 108/79 = 1.37, so the odds ratio = (251/241)/(108/79) = 0.76, indicating that the odds of finding life exciting rather than routine for those married are about 76% the odds for those never married.
Information Classification: General
Azen & Walker
Solutions
13
4.10 Answers will vary depending on the 2 by 2 sub-table selected. Examples: (21)(108)/(251)(11) = 0.82 indicates that the odds of finding life dull rather than exciting for married people (.084) are 0.82 times the odds for those never married (.102). Or the odds of finding life exciting rather than dull for married people (11.95) are 1.2 times the odds for those never married (9.82). 4.11
Recovery rates: a. The odds of recovery for those over 70 = 0.866/0.134, and for those under 70 = 0.915/0.085, so the odds ratio = (0.866/0.134)/(0.915/0.085) = 0.60, indicating that the odds of recovery for those over 70 are about 60% the odds for those under 70. b. This interpretation requires comparing the probabilities (not odds) of recovery: 0.866/0.915 = 0.946, so 94.6% is the correct percentage. The FREQ Procedure Statistics for Table of marital by lifeatt Statistic DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 8 39.2202 <.0001 Likelihood Ratio Chi-Square 8 31.9114 <.0001 Mantel-Haenszel Chi-Square 1 0.0339 0.8539 Phi Coefficient 0.1984 Contingency Coefficient 0.1946 Cramer's V 0.1403 Sample Size = 996
4.12 Agreement: a. kappa = (0.5-0.3775)/(1-0.3775) = 0.197. This represents relatively low agreement. b. With 95% confidence, the value of kappa in the population is between -0.17 and 0.56. Because this interval contains 0, the level of agreement is not significantly larger than what would be expected by chance alone. Relevant output: Kappa Statistics Statistic Value ASE 95% Confidence Limits ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Simple Kappa 0.1968 0.1870 -0.1698 0.5634 Weighted Kappa 0.2617 0.1874 -0.1055 0.6290 Sample Size = 20
. 4.13
Answers can vary, but the off-diagonal values should all be zero, and the sum of diagonal values should add up to 20. The value of kappa for such a table would be exactly one.
4.14
Answers will vary.
Information Classification: General
Azen & Walker
Solutions
14
Chapter 5 5.1 a. Marginal table: Table of time by employer time
employer
Frequency‚ Percent ‚ Row Pct ‚ Col Pct ‚else ‚self ‚ Total ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ FT ‚ 2029 ‚ 286 ‚ 2315 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ PT ‚ 346 ‚ 98 ‚ 444 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Total 2375 384 2759 86.08
13.92 100.00
b. The marginal odds ratio is 2.0 and it is statistically significant (𝜒 2 = 29.365 or G2 = 29.4, p < .0001). c. The odds of being employed by someone else rather than being self-employed for those who work FT are two times the odds for those who work PT. Alternatively, the odds of working FT rather than PT if working for someone else are twice the odds if selfemployed. 5.2 a. The conditional odds ratios are 1.8 for males and 2.8 for females. b. For males, the odds of being employed by someone else rather than being selfemployed are 1.8 times larger for those who work FT than for those who work PT. For females, the odds of being employed by someone else rather than being self-employed are 2.8 times larger for those who work FT than for those who work PT. c. Conditional odds ratios control for gender and examine the association separately for males and females, whereas the marginal odds ratio ignores gender completely.
5.3
The Breslow-Day test indicates that there is not a statistically significant three-way association in the table (𝜒 2 = 2.38, df = 1, p = 0.123). Therefore, we can conclude that there is a homogeneous association among the variables. Moreover, the CMH test for conditional independence is statistically significant (𝜒 2 = 41.32, df = 1, p < 0.001) so we can conclude that there is a two-way conditional association in the table. Specifically, controlling for gender there is an association between working full time (versus part-time) and whether one is self-employed, and it is the same for both genders. Alternatively, controlling for employment type there is an association between gender and whether or not one works full time, and it does not depend on whether or not one is self-employed. Finally, controlling for time, there is an association between gender and being self-employed that does not depend on whether or not one works full time.
Information Classification: General
Azen & Walker
Solutions
15
Since there is homogeneous association in the table, a common odds ratio can be used to summarize any of these dependencies. The Mantel-Haenszel estimate of a common odds ratio for the association between time working and whether one is self-employed, controlling for gender, is about 2.3. Therefore, we can conclude that the odds of working full-time if one is not self-employed are 2.3 times greater than if one were self-employed, and this is the case for both males and females. 5.4 a. The marginal association between gender and belief in the afterlife is obtained from the following two-way table that is collapsed across religious beliefs:
Males Females
Yes, believe in afterlife 752 1,108
No, do not believe in afterlife 190 183
̂ = 0.654. Therefore, for males the odds of believing in the afterlife are lower This association is θ (0.654 times of) the odds for females, ignoring the effect of religious beliefs. Alternatively, for females the odds of believing in the afterlife are higher (1.53 times of) than the odds for males. b. For Fundamentalists the odds of males believing in the afterlife are 0.698 times the odds of females believing in the afterlife.
For Moderates the odds of males believing in the afterlife is 0.702 times the odds of females believing in the afterlife.
For Liberals the odds of males believing in the afterlife are 0.687 times the odds of females believing in the afterlife. c. The Breslow-Day test indicates that there is not a statistically significant three-way association in the table ( = 0.007, df = 2, p = 0.997). Therefore, we can conclude that the conditional association between gender and belief in the afterlife does not depend on religious beliefs. d. The CMH test for conditional independence between gender and belief in the afterlife is statistically significant ( = 9.97, df = 1, p = 0.002). Therefore, we can conclude that there is an association between gender and belief in the afterlife, conditional on religious belief. e. Since there is a homogeneous association and conditional dependence between gender and belief in the afterlife, we can conclude that there is an association between these two variables but it is the same regardless of religious beliefs. Due to the homogeneous association that exists, a Mantel-Haenszel estimate of the common odds ratios can be computed. Specifically, the common odds ratio between gender and belief in the afterlife, conditional on religious beliefs is 0.69:
252(50) / 765 + 274(50) / 786 + 226(83) / 682 = 0.693 420(43) / 765 + 417(74) / 786 + 273(100) / 682 Therefore, the odds of believing in the afterlife if one is male is 0.693 times the odds of believing in the afterlife if one is female, after controlling for religious beliefs. Alternatively, one could
Information Classification: General
Azen & Walker
Solutions
16
state that the odds of believing in the afterlife if one is female is 1.44 times the odds of believing in the afterlife if one is male, after controlling for religious beliefs.
Summary Statistics for gender by afterlife Controlling for relig Cochran-Mantel-Haenszel Statistics (Based on Table Scores) Statistic Alternative Hypothesis DF Value Prob ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ 1 Nonzero Correlation 1 9.9659 0.0016
Estimates of the Common Relative Risk (Row1/Row2) Type of Study Method Value 95% Confidence Limits ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Case-Control Mantel-Haenszel 0.6942 0.5532 0.8712 (Odds Ratio) Logit 0.6943 0.5532 0.8713 Breslow-Day Test for Homogeneity of the Odds Ratios ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ Chi-Square 0.0069 DF 2 Pr > ChiSq 0.9966
Total Sample Size = 2233
5.5 There is homogenous association (Breslow-Day test statistic = 1.45, p = .23), so the conditional associations of 1.28 for Caucasians and 0.61 for African-Americans are statistically equal to each other. The common conditional odds ratio estimate is about 1.2, and the conditional association is not statistically significant (CMH test statistic = 1.79, p = .18) so there is conditional independence. Thus, controlling for race, agreement (with spanking a child) and gender are not associated. That is, the odds of agreement (with spanking a child) are the same for males and females, and this is the case across both races. 5.6 a. The marginal association between gender and attitude towards life is based on the following two-way table, collapsed across educational level:
Males Females
Think life is exciting or dull? Dull or Routine Exciting 216 200 282 251
This association is θ̂ = 0.961. Therefore, for males the odds of thinking that life is dull or routine are almost the same (0.96 times) the odds for females, ignoring the effect of education. b. The marginal association between educational level and attitude towards life is based on the following two-way table, collapsed across gender:
Information Classification: General
Azen & Walker
No College College
Solutions
17
Think life is exciting or dull? Dull or Routine Exciting 423 312 75 139
This association is θ̂ = 2.51. Therefore, the odds of thinking that life is dull or routine are 2.5 times greater if one has no college degree than if one has a college degree, ignoring the effect of gender. c. For those without a college degree, the odds of thinking that life is dull or routine are 1.02 times greater if one is male than if one is female. For those with a college degree, the odds of thinking that life is dull or routine are 1.01 times greater if one is male than if one is female. d. For males, the odds of thinking that life is dull or routine are 2.52 times greater if one does not have a college degree than if one does have a college degree. For females, the odds of thinking that life is dull or routine are 2.51 times greater if one does not have a college degree than if one does have a college degree. e. The Breslow-Day test indicates that there is not a statistically significant three-way association in the table ( < 0.001, df = 1, p = 0.988). Therefore, we can conclude that the conditional association between gender and attitude towards life does not depend on educational level. f. Since the Breslow-Day test is not statistically significant (see 5.4 (e)) we can conclude that there is homogeneous association between the three variables; therefore, the conditional association between educational level and attitude towards life does not depend on gender. g. The CMH test for conditional independence between gender and attitude towards life is not statistically significant ( = 0.01, df = 1, p = 0.905). Therefore, we can conclude that gender and attitude towards life are conditionally independent, after controlling for education level. h. The CMH test for conditional independence between education and attitude towards life is statistically significant ( = 33.5098, df = 1, p < .0001). Therefore, we can conclude that education and attitude towards life are conditionally dependent (associated), after controlling for gender. i. Gender and attitude towards life are both marginally independent ( = 0.09, df = 1, p = 0.763) and conditionally independent, after conditioning on education. That is, after controlling for education (or ignoring education), there is no association between gender and attitude towards life. On the other hand, education and attitude towards life are conditionally associated. Since there is a homogeneous association among the three variables, this association is similar for both males and females. The common odds ratio estimate is 2.52 and indicates that, for either males or females, the odds of thinking that
Information Classification: General
Azen & Walker
Solutions
18
life is dull or routine are 2.52 times greater if one does not have a college degree than if one does have a college degree. 5.7
Research questions can vary. Some examples are provided below. Research Question #1: Is there a homogeneous association between country, gender, and attitude towards school (as measured by the extent that one believes school was a waste of time)? There is not a homogeneous association between these three variables. The Breslow-Day test statistics is = 57.448, df = 3, p < 0.001. This implies that a three-way interaction exists between the three variables and the two way associations need to be interpreted individually for each level of the third variable. Research Question #2: Is there a conditional association between gender and attitude towards school for students in the United States? Yes, there is a conditional association between gender and attitude towards school for students in the United States ( = 128.51, df = 3, p < 0.001). As the table below demonstrates, females in the United States are less likely to strongly agree, agree, or disagree with this statement and more likely to strongly disagree with this statement. Conversely, males in the United States are more likely to strongly agree, agree, or disagree with this statement and less likely to strongly disagree with this statement. If we combine the strongly agree and agree categories, as well as the strongly disagree and disagree categories, the odds of agreeing (or strongly agreeing) that school is a waste of time are only 0.43 times less if one is a female in the United States than if one is a male in the United States. In other words, the odds of agreeing or strongly agreeing with this statement are 2.3 times greater if one is a male in the United States than if one is a female in the United States. Gender * School_waste Crosstabulation School_waste SA Gender Female Count
Male
Total
A
D
SD
Total
38
125
1227
1253
Std. Residual
-3.8
-4.5
-2.0
5.0
Count
102
249
1369
922
Std. Residual
3.8
4.5
2.0
-5.0
Count
140
374
2596
2175
2643
2642
5285
Research Question #3: Is there a conditional association between gender and attitude towards school for students in Korea?
Information Classification: General
Azen & Walker
Solutions
19
No, there is not a conditional association between gender and attitude towards school for students in Korea ( = 7.36, df = 3, p = 0.061). 5.8
The Breslow-Day test indicates that there is not a statistically significant three-way association in the table ( = 67.45, df = 3, p < 0.001). Therefore, we can conclude that there is a homogeneous association among the variables. Substantively this means that the association between owning a computer and attitude towards learning mathematics is the same in both the United States and Korea. A few (conditional) odds ratios may be computed to further interpret the association.
5.9 a. There is evidence that the association between self-efficacy in math and perception of teaching methods depends on county: Breslow-Day statistic is 15.5, df = 2, p = .0004. b. It does not make sense to conduct the CMH test because the conditional associations differ by country and thus cannot all be 1. c. The CMH test is not appropriate because of lack of homogeneous association. However, CMH statistic is 407.78, df = 1, p <.0001 (so no conditional independence). By country, these odds ratios are significant in each country individually, as shown below: USA OR = 0.4808, 95% CI: [0.4255, 0.5433] Australia OR = 0.5212, 95% CI: [0.4804, 0.5656] France OR = 0.6734, 95% CI: [0.5921, 0.7658] d. The conditional odds ratios are not all equal (from Breslow-Day test), but rather significantly differ by country – the association is strongest in the USA and weakest for France, but all indicate a significant association. In all countries, the odds of reporting that the teacher continues teaching until students understand are lower for those who believe they are bad at math than for those who do not. So perhaps those students who do not consider themselves good at math also perceive that the tendency of teachers is not to teach until they understand. 5.10
Answers will vary depending on substantive example provided. Answer should clearly distinguish between marginal associations (which ignore the third variable) and conditional associations (which account for the third variable) using the variables in the example.
5.11
Answers will vary depending on substantive example provided. Answer should clearly distinguish between homogeneous association (all conditional odds ratios are equal to each other) and conditional independence (all conditional odds ratios are equal to 1) using the variables in the example.
5.12
Answers will vary depending on substantive example provided. Answer should include a clear explanation of why homogeneous association would be theoretically present using the variables in the example.
5.13
Answers will vary depending on substantive example provided. Answer should include a clear explanation of why conditional independence would be theoretically present using the variables in the example.
Information Classification: General
Azen & Walker
Solutions
20
5.14
If only this one pair of the variables is conditionally independent, then it is possible that other pairs (e.g., X and Z or Y and Z) would be conditionally dependent. If that is the case, and the conditional dependence between a pair of variables manifests in different conditional associations across the levels of the third variable, then the data will not show homogenous association.
5.15
If there is no homogeneous association then for at least one pair of variables the conditional association will not be equal across all levels of the third variable. Therefore, these conditional odds ratios will not all be equal to one and the variables involved cannot be conditionally independent. However, it is possible that some (other) pairs of variables will exhibit conditional independence.
Information Classification: General
Azen & Walker
Solutions
21
Chapter 6 6.1
The general purpose of a link function is to ensure an appropriate representation of the relationship between the explanatory and response variables. Structurally, with the appropriate link function all predicted values of the response are reasonably possible. A function other than the identity link is needed if the identity link results in a relationship that is not linear throughout, and/or possible nonsensical predicted response values.
6.2
In general, GLMs provide for a much wider "family" of possible models because a link other than the identity link can be used with GLMs (also see answer to question 6.1). More specifically, this allows us to model categorical response variables that are not normally distributed.
6.3
Response variable: number of students. a. Random component: number of students who are absent from a given classroom per day follow the Poisson distribution, because the response values are positive integers. b. Systematic component: a linear combination of the predictors (family income, race, and gender). c. Link function: the log function is the canonical link for the Poisson distribution.
6.4
Response variable: probability of voting for a particular candidate. a. Random component: the probability that a voter will vote for a particular candidate follows the Binomial distribution, because the response values consist of probabilities for one of two possible outcomes. b. Systematic component: a linear combination of the predictors (family income, educational level, race, and gender). c. Link function: the logit function is the canonical link for the Binomial distribution.
6.5
Answers will vary. Outcome variable should be a count, random component would be the Poisson distribution, the systematic component would be a linear combination of the predictors, and the link function would be the log function.
6.6
Answers will vary. Outcome variable should be dichotomous, random component would be the Binomial distribution, the systematic component would be a linear combination of the predictors, and the link function would be the logit function.
6.7
Using the data in Table 6.2: a. Scatterplot is S-shaped and not linear throughout. b. Scatterplot asymptotes at the high end of the X-scale and is not linear throughout. c. Scatterplot is linear throughout. d. The logit link function if more appropriate as it allows for a linear representation of the relationship between the variables.
6.8
For all 4 predictors (model 1), -2LL = 558. a. G2 = -2ln(L0) - [-2ln(L1)] = 672 - 558 = 114.
Information Classification: General
Azen & Walker
Solutions
22
b. With df = 4, the test statistic is significant. Conclusion: The model with all 4 predictors fits significantly better than the null/empty model, and together the 4 predictors predict whether an individual smokes significantly better than no predictors. 6.9
For 2 predictors (model 2), -2LL = 574. a. G2 = -2ln(L2) - [-2ln(L1)] = 574 - 558 = 16. With df = 2, the test statistic is significant. b. The model with all 4 predictors is preferred because it fits significantly better than the model with just annual income and years of schooling. Conclusion: the predictors of smoking exposure and healthy lifestyle significantly add to the prediction of whether an individual smokes over just annual income and years of schooling.
6.10
For model in question 6.8, with smoking or not as outcome: a. Random component is the binomial distribution because the outcome is binary (smoking or not). b. The systematic component is α + β1x1 + β2x2 + β3x3 + β4x4 c. The appropriate link function is the logit function (log odds of smoking probability).
6.11
Using only years of schooling as a predictor: a. The intercept estimate is -2.88 and the slope estimate is 0.45. b. G2 = 672 - 652.5 = 19.5. c. The Wald statistic is z = -0.4521/0.1043 = -4.335. d. The Wald statistic shown is 18.8, obtained by squaring the z-statistic in part c: (4.335)2 = 18.8 (discrepancies are due to rounding error). e. With df=1, the fit of the model with this predictor is significantly better than the fit of the model with no predictors. Thus, years of schooling significantly predicts the probability of smoking. f. The slope is significantly different than zero, so there is a significant relationship between years of schooling and the probability of smoking.
Information Classification: General
Azen & Walker
Solutions
23
Chapter 7 7.1 a. See table below for the models fit, where S = sex, R = level of fundamentalism, and D = opinion on death penalty Model Deviance df Hom. Assoc. 1.798 2 RS, RD appear to be insignificant (RS, RD, SD) Joint Ind. 30.4518 5 (RD, S) Joint Ind. 31.4618 5 (RS, D) Joint Ind. 4.6532 6 Most parsimonious model (R, SD) Complete Ind. 32.1847 7 (R, S, D) b. There is an association between sex and death penalty opinion, and it is the same for each religious belief (level of fundamentalism). Religious belief (level of fundamentalism) is not associated with sex or death penalty opinion. c. From output, using female and opposed as the reference categories, the SD interaction parameter is Exp(.6585) = 1.9. The odds of males favoring the death penalty are 1.9 times the odds of females favoring the death penalty, and this is true for each religious belief category (fundamentalist, moderate, liberal). This odds ratio can be obtained also (or alternatively) from the fitted values shown below. Table 1 of sex by deathpen Controlling for relig=fund sex
deathpen
Frequency‚fav ‚opp ‚ Total ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ male ‚ 125.6 ‚ 40.109 ‚ 165.7 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ female ‚ 117.69 ‚ 72.605 ‚ 190.3 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Total 243.286 112.714 356
Table 2 of sex by deathpen Controlling for relig=mod sex
deathpen
Frequency‚fav ‚opp ‚ Total ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ male ‚ 180.28 ‚ 57.572 ‚ 237.85 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ female ‚ 168.93 ‚ 104.22 ‚ 273.15 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Total 349.211 161.789 511
Table 3 of sex by deathpen Controlling for relig=lib
Information Classification: General
Azen & Walker sex
Solutions
24
deathpen
Frequency‚fav ‚opp ‚ Total ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ male ‚ 123.13 ‚ 39.32 ‚ 162.45 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ female ‚ 115.38 ‚ 71.178 ‚ 186.55 ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ Total 238.502 110.498 349
7.2 a. See table below for the models fit, where S = sex, R = race, and D = opinion on spanking for discipline Model Deviance df Hom. Assoc. 8.6165 6 Not sig. different from saturated: (SR, SD, RD) most parsimonious model Cond. Ind. 21.6869 8 Sig. drop in fit (SD, RD) Cond. Ind. 59.4955 12 Sig. drop in fit (SR, SD) Cond. Ind. 26.5574 9 Sig. drop in fit (SR, RD) b. There is an association between each pair of variables (e.g., sex and opinion) and it is the same for each level of the third variable (e.g., race). c. Using female and SD as reference categories, the Spanking by Sex odds ratios (within each race) indicate: • odds of strongly agreeing rather than strongly disagreeing with spanking for males are exp(1.0467) = 2.84 times the odds for females (this is statistically significant); • odds of agreeing rather than strongly disagreeing with spanking for males are exp(0.8539) = 2.35 times the odds for females (this is statistically significant); • odds of disagreeing rather than strongly disagreeing with spanking for males are exp(0.4126) = 1.51 times the odds for females (this is not statistically significant). • In conclusion, males are more likely to endorse spanking than females (controlling for or conditional on race); this association does not vary significantly by race. Analysis Of Maximum Likelihood Parameter Estimates Parameter
DF Estimate
Standard Error
Wald 95% Confidence Limits
Wald Chi- Pr > ChiSq Square
Spanking*Sex
SA M
1
1.0467
0.3160
0.4275
1.6660
10.97
0.0009
Spanking*Sex
A
M
1
0.8539
0.2993
0.2673
1.4405
8.14
0.0043
Spanking*Sex
D
M
1
0.4126
0.3210
-0.2165
1.0418
1.65
0.1986
Spanking*Race SA W
1
0.8860
0.5555
-0.2027
1.9747
2.54
0.1107
Spanking*Race SA B
1
2.2840
0.7488
0.8162
3.7517
9.30
0.0023
Spanking*Race A
W
1
0.2123
0.4697
-0.7083
1.1329
0.20
0.6513
Spanking*Race A
B
1
0.9518
0.6869
-0.3945
2.2981
1.92
0.1659
Spanking*Race D
W
1
-0.1796
0.4877
-1.1354
0.7762
0.14
0.7127
Spanking*Race D
B
1
-1.2538
0.8457
-2.9114
0.4038
2.20
0.1382
Information Classification: General
Azen & Walker
Solutions
25
Analysis Of Maximum Likelihood Parameter Estimates Parameter
DF Estimate
Standard Error
Wald 95% Confidence Limits
Wald Chi- Pr > ChiSq Square
Sex*Race
M W
1
-0.3368
0.2489
-0.8245
0.1510
1.83
0.1760
Sex*Race
M B
1
-1.0423
0.3207
-1.6708
-0.4137
10.56
0.0012
7.3 a. The absolute standardized Pearson residuals vary from about 0.04 to 1.75 and most are quite small (below 1). b. The absolute standardized Pearson residuals vary from about 0.02 to 2.77. A few residuals are above 2 but most are quite small (below 1). c. The homogeneous association model had deviance of 3.48 with 4 df and the complete independence has a deviance of 15.32, with 15 df. The test statistic is 11.84 with 9 df, so the difference in fit is not statically significant (p = 0.22). d. For parsimony, we would choose the complete independence model as its fit is not significantly worse and it does not produce many large residuals. 7.4 a. The four-way association was not needed as the deviance of the homogeneous association model (with all 4 three-way associations) is 2.04 with 1 df. • The deviances of the models with 3 of the 4 three-way associations ranged from 2.18 to 8.35 (with 2 df), so the model with the smallest deviance (containing the Sex*Sep*Home, Sex*Med*Home, and Sep*Med*Home interactions) was further reduced. • Of the models with 2 of the 3 three-way interactions, the model (containing the Sex*Sep*Home and Sep*Med*Home interactions) had the smallest deviance (2.90 with 3 df). • Reducing this model further, the model with the single three-way interaction of Sex*Sep*Home fit equally well (deviance of 3.5175 with 4 df), but removing this interaction resulted in significantly worse fit (deviance of 9.2789 with 5 df). • Thus, the most parsimonious model contains all two-way interactions and the Sex*Sep*Home three-way interaction. b. The parameter for the three-way association is a ratio of odds ratios; it indicates that for males the association between separating and home condition (i.e., odds of separating if the home is in poor condition relative to the odds of separating if the home is not in poor condition) are lower than for females. Specifically, the odds ratio for females is exp(0.5782) = 1.78 while the odds for males are about exp(-1.18407) = 0.3 of that, or exp(0.5782-1.18407) = exp(0.61) = 0.55. c. The medical need variable is not involved in the three-way association. Its two-way associations can be interpreted as follows: • The odds that one is unable to afford needed medical care for lower for males than for females; the odds for males are exp(-.1074) = 0.9 times the odds for females.
Information Classification: General
Azen & Walker • •
Solutions
26
The odds that one is unable to afford needed medical care for those separating are exp(1.4326) = 4.2 times the odds for those not separating. The odds that one is unable to afford needed medical care for those whose home is in poor condition are exp(1.7675) = 5.9 times the odds for those whose home is not in poor condition.
7.5
The three-way association was not needed as the deviance of the homogeneous association model (with all two-way associations) is 2.24 with 1 df. Of the models with 2 of the 3 two-way associations, the model with the smallest deviance (4.0748 with 2 df) fit as well as the homogeneous association model and included the associations between relationship status and each of the other variables (sex and whether looking for work). Removing either of these associations resulted in significantly worse fit, so the most parsimonious model contains the association between relationship status and sex as well as between relationship status and whether one is looking for work. From this model: • The odds of currently being in a relationship with last sex partner for males are 35% of (so much lower than) the odds for females, and this is the case regardless of whether one is looking for work; • The odds of currently being in a relationship with last sex partner for those looking for work are 42% of (so much lower than) for those not looking for work, and this is the case regardless of whether one is male or female.
7.6
For all departments: a. The fit of the homogenous association model is significantly worse than that of the saturated model: G2 = 20.2, df = 5, p = .001. Therefore, there is a significant threeway association among the variables. b. The test performed in part (a) analogous to the Breslow-Day test because it tests whether there is a significant three-way association. The CMH test would test whether a given pair of the variables are conditionally associated. c. The large standardized residuals are for females in Department A, so that is the department most likely responsible for the lack of fit of the homogeneous association model and the need for a three-way association.
7.7
Without department A: a. The fit of the homogenous association model not significantly worse than that of the saturated model: G2 = 2.556, df = 5, p = .063. Therefore, there is no significant threeway association among the variables. b. The fit of the conditional independence model (deviance = 2.68, df = 5) is not significantly worse than that of the homogenous association model: G2 = 0.125, df = 1, p = 0.724. Therefore, gender and admission are conditionally independent (given department). c. The test performed in part (b) analogous to the Cochran–Mantel–Haenszel (CMH) test because it tests whether a given pair of the variables are conditionally associated. The Breslow-Day test because it tests whether there is a significant three-way association (as in part a). d. The conditional independence model fit in part (b) cannot be further reduced. Removing the admission by department association increases the deviance to 539.46
Information Classification: General
Azen & Walker
Solutions
27
with 9 df, and removing the gender by department association increases the deviance to 756.12 with 9 df. e. Using the conditional independence model fit in part (b), the odds of admission in department B are exp(3.2185) = 25 times higher than the odds of admission in department F. 7.8
The advantages of fitting a log-linear model rather than using the procedures described in Chapter 5 include that the model is much more flexible and allows testing many patterns of associations, even if the tables are larger than 2 by 2 by K. A potential disadvantage is that modeling is a more complex process, but this is likely outweighed by the advantages.
Information Classification: General
Azen & Walker
Solutions
28
Chapter 8 8.1 α = 2, β1 = 0.5 and β2 = -0.3 a. logit(π) = ln(odds) = 2 + 0.5(0) - 0.3(0) = 2 b. odds = exp[ln(odds)] = exp(2) = 7.4 c. The value of the intercept, 2, is the expected value of the log odds when all predictors are zero, and the exponentiated intercept, e2 = 7.4, is the expected value of the odds when all predictors are zero. d. logit(π) = ln(odds) = 2 + 0.5(1) - 0.3(5) = 1 e. odds = exp[ln(odds)] = exp(1) = 2.7 f. probability = odds/(1 + odds) = 2.7/3.7 = 0.7 8.2 α = 1.5, β1 = 0.4 and β2 = -0.1 a. logit(π) = ln(odds) = 1.5 + 0.4(0) - 0.1(0) = 1.5 b. odds = exp[ln(odds)] = exp(1.5) = 4.5 c. The value of the intercept, 1.5, is the expected value of the log odds when all predictors are zero, and the exponentiated intercept, e1.5 = 4.5, is the expected value of the odds when all predictors are zero. d. logit(π) = ln(odds) = 1.5 + 0.4(1) - 0.1(5) = 1.4 e. odds = exp[ln(odds)] = exp(1.4) = 4.055 f. probability = odds/(1 + odds) = 4.055/5.055= 0.8 8.3 α = 2, β1 = 0.5 and β2 = -0.3 a. odds = exp[ln(odds)] = exp[2 + 0.5(2) - 0.3(5)] = exp(1.5) = 4.48 b. odds = exp[ln(odds)] = exp[2 + 0.5(3) - 0.3(5)] = exp(2) = 7.39 c. The exponentiated β1 value is the multiplicative rate of change in the odds as X1 increases by one unit and X2 is held constant: exp(β1) = e0.5 = 1.65. So when X1 increased from 2 to 3 (and X2 remained constant), the predicted odds increased by 165% or 1.65 times: 4.48(1.65) = 7.39. 8.4 α = 1.5, β1 = 0.4 and β2 = -0.1 a. odds = exp[ln(odds)] = exp[1.5 + 0.4(2) - 0.1(4)] = exp(1.9) = 6.7 b. odds = exp[ln(odds)] = exp[1.5 + 0.4(2) - 0.1(5)] = exp(1.8) = 6.0 c. The exponentiated β2 value is the multiplicative rate of change in the odds as X2 increases by one unit and X1 is held constant: exp(β2) = e-0.1 = 0.90. So, with X1 remaining constant, the odds when X2 is 5 are 90% of (or 0.90 times) the odds when X2 is 4: 6.7(0.90) = 6.0. 8.5 Using the ADD data set with ADDSC and GPA as predictors of dropping out: a. The model with both predictors fits significantly better than the empty model (with no predictors); G2 = 12.5, df = 2, p = .0019. b. The slope for ADDSC is 0.103, and exp(0.103) = 1.11. So keeping GPA constant, the odds of dropping out are multiplied by 1.11 (i.e., increase) for each one point increase in ADDSC, and this increase is statistically significant (2 = 7.7, df = 1, p = .005). The slope for GPA is 0.065, and exp(0.065) = 1.107. So keeping ADDSC constant, the odds of dropping out are multiplied by 1.07 (i.e., increase) for each one point
Information Classification: General
Azen & Walker
Solutions
29
increase in GPA, but this increase is not statistically significant (2 = 0.2, df = 1, p = .897). 8.6 Using the ADD data set with ADDSC as predictor of dropping out: a. Slope for ADDSC is 0.101, and exp(0.101) = 1.11, so the odds of dropping out are multiplied by 1.11 (i.e., increase) for each one point increase in ADDSC and this is a significant rate of change (Wald 2= 9.89, df = 1, p = .0017). b. The model with ADDSC only fits significantly better than the empty model (with no predictors); G2 = 12.48, df = 1, p = .0004. c. Conceptually, the test in part (a) is the same as that in part (b) in that they both test the null hypothesis that the slope is zero. In part (a) the Wald test was reported and in part (b) the Likelihood Ratio test was reported. 8.7 Comparing the models: a. -2LL for the model with both predictors = 49.812 -2LL for the model with ADDSC only = 49.829 G2 = 49.829-49.812 = 0.017. With df = 1, this is not statistically significant. Therefore, GPA does not add significantly to prediction after accounting for ADDSC. b. The Wald test for GPA is shown in the output obtained for question 8.5. Wald 2 = 0.0168, df = 1, p = 0.8969. This result is very similar, and the conclusions are identical, to the LR test in part (a) above. 8.8 Results will vary depending on variables selected. 8.9 Using data from the 2006 GSS: a. Comparing the fit of the model with AGE, EDUC and SEI to the fit of the model with AGE and EDUC only, G2 = 1193.649-1192.223 = 1.426. With df=1, this is not statistically significant at the .05 level. So SEI is not needed after controlling for age and education. b. Comparing the fit of the model with AGE and EDUC and to the fit of the model with AGE only, G2 = 1200.508-1193.649 = 6.859. With df=1, this is statistically significant at the .05 level. So education is a significant predictor (i.e., adds significantly to prediction) after controlling for age. c. The model with AGE and EDUC is the most parsimonious of the three because it fits as well as the more complex model and significantly better than the simpler model. d. Parameter estimate for AGE: After controlling for education, for a one year increase in age the ln(odds) of supporting sex education in public schools decreases by 0.0185 or the odds are multiplied by 0.982. Thus, after controlling for years of education, the odds decrease as age increases. Parameter estimate for EDUC: After controlling for age, for a one year increase in education the ln(odds) of supporting sex education in public schools increases by 0.0597 or the odds are multiplied by 1.062. Thus, after controlling for age, the odds increase as education increases. e. The Hosmer and Lemeshow Goodness-of-Fit Test statistic is 13.66, df = 8, p = 0.091. Therefore, model fit is adequate (p > .05). f. The predicted probability that a respondent would favor sex education in the public schools if that respondent is 40 years old and has completed 12 years of education = exp(2.2879 - 0.0185(40) + 0.0597(12))/[1 + exp(2.2879 - 0.0185(40) + 0.0597(12))] = exp(2.2643)/[1+ exp(2.2643)] = 9.624/10.624 = 0.906.
8.10
Answers will vary depending on variables chosen.
Information Classification: General
Azen & Walker
8.11
Solutions
30
First, a variable representing two groups (diabetic or normal) must be created. There are various approaches to deciding on a model. By fitting various models, it becomes apparent that with this data set the ML procedure will not converge when SSPG or INSTEST are included along with GLUTEST. Also, since it is not clear what the "relative weight" variable represents, it is not included as a predictor. Summary information for other models is provided below: Predictors in model GLUFAST GLUTEST INSTEST SSPG GLUFAST GLUTEST GLUFAST INSTEST GLUFAST SSPG GLUTEST INSTEST GLUTEST SSPG INSTEST SSPG GLUFAST GLUTEST INSTEST GLUFAST GLUTEST SSPG GLUFAST INSTEST SSPG GLUTEST INSTEST SSPG
-2LL of model 121.9 11.1 198.7 106.7 7.5 103.4 83.7 Not valid Not valid 106.5 Not valid Not valid 82.5 Not valid
These results seem to indicate that inclusion of GLUTEST (by itself) dramatically improves the fit of the model. The model containing both GLUFAST and GLUTEST appears to be the most parsimonious. Testing it against the model containing GLUTEST alone, G2 = 11.1 - 7.5 = 3.6, df = 1, which is not statistically significant. Therefore, the model with GLUTEST alone appears to be the most parsimonious model. Interpreting the model containing only GLUTEST as a predictor results in the following: • The model fits significantly better than the null or empty model, indicating that GLUTEST is a significant predictor of diabetes status. • An examination of standardized residuals does not reveal any problematic cases. • The parameter estimates are -90.4 for the intercept and 0.2 for the slope. Thus, when the test plasma glucose level is at zero, the expected ln(odds) of having diabetes is 90.4 and the expected odds of having diabetes (rather than not) is close to zero. As the test plasma glucose increases by one, the expected ln(odds) of having diabetes increases by 0.2 and the expected odds of having diabetes are multiplied by 1.2.
Information Classification: General
Azen & Walker
Solutions
31
Chapter 9 9.1 a. The value of = -1.0 indicates that, for observations in category A of the predictor, the expected value of the log odds of "success" will be -1.0 and the expected odds of "success" will be exp(-1.0) = 0.37. The value of 1 = 2.0 compares categories B and A; specifically, it indicates that for observations in category B of the predictor the expected value of the log odds of "success" will be larger by 2.0 than for category A, or that the odds of "success" will be exp(2.0) = 7.4 times larger than for category A. The value of 2 = 1.0 compares categories C and A; specifically it indicates that for observations in category C of the predictor the expected value of the log odds of "success" will be larger by 1.0 than for category A, or that the odds of "success" will be exp(1.0) = 2.7 times larger than for category A. b. Yes, the values would change. The value of would represent the log odds of success for observations in category C, and the other two parameters would represent (in turn) the difference between the log odds for observations in category C and those in each of the other two categories. Specifically, based on part (a) we would anticipate that (log odds for category C) = 0, 1 (comparing categories A and C) = -1.0, and , 2 (comparing categories B and C) = 1.0. 9.2 a. The estimates provided in the question should be verified by computer software. For example, using SAS: Analysis of Maximum Likelihood Estimates
Parameter
Standard DF Estimate
Wald Error Chi-Square Pr > ChiSq
Intercept 1 -0.9193 0.0838 120.2303 <.0001 politview Lib 1 1.8638 0.1344 192.4219 <.0001 politview Mod 1 1.0341 0.1158 79.6833 <.0001
Odds Ratio Estimates
Effect
Point 95% Wald Estimate Confidence Limits
politview Lib vs Cons 6.448 4.955 8.390 politview Mod vs Cons 2.813 2.241 3.529
b. Conservative as reference category: • The intercept of -0.92 indicates the predicted log odds of voting for Clinton when one is Conservative. The odds for Conservatives are exp(-0.92) = 0.4 and the probability is 0.4/1.4 = 0.28. • The slope of 1.86 indicates the difference between Liberals and Conservatives in the predicted log odds of voting for Clinton. The odds for Liberals are exp(1.86) = 6.4 times the odds for Conservatives.
Information Classification: General
Azen & Walker
Solutions
32
•
The slope of 1.03 indicates the difference between Moderates and Conservatives in the predicted log odds of voting for Clinton. The odds for Moderates are exp(1.03) = 2.8 times the odds for Conservatives. c. Liberal as reference category: • The intercept of 0.94 indicates the predicted log odds of voting for Clinton when one is Liberal. The odds for Liberal are exp(0.94) = 2.6 and the probability is 2.6/3.6 = 0.72. • The slope of -1.86 indicates the difference between Conservatives and Liberals in the predicted log odds of voting for Clinton. The odds for Conservatives are exp(1.86) = 0.16 times the odds for Liberals (same as in part b). • The slope of -0.83 indicates the difference between Liberals and Moderates in the predicted log odds of voting for Clinton. The odds for Moderates are exp(-0.83) = 0.4 times the odds for Liberals. d. Using the parameter estimates, the log odds of voting for Clinton if one is Moderate would be -0.92+1.03 = 0.94-0.83 = 0.11, so the odds would be exp(0.11) = 1.1 and the probability would be 1.1/2.1 = 0.53. 9.3
The equivalent log-linear model obtains the following parameters (from SAS): Analysis Of Maximum Likelihood Parameter Estimates
Parameter
Standard DF Estimate
Wald 95% Wald Error Confidence Limits Chi-Square Pr > ChiSq
Intercept 1 6.2126 0.0448 6.1249 6.3003 19259.6 <.0001 Clinton Yes 1 -0.9193 0.0838 -1.0836 -0.7550 120.23 <.0001 Clinton No 0 0.0000 0.0000 0.0000 0.0000 . . politview Lib 1 -1.3763 0.0997 -1.5717 -1.1809 190.56 <.0001 politview Mod 1 -0.5222 0.0734 -0.6660 -0.3785 50.67 <.0001 politview Cons 0 0.0000 0.0000 0.0000 0.0000 . . Clinton*politview Yes Lib 1 1.8638 0.1344 1.6004 2.1271 192.42 <.0001 Clinton*politview Yes Mod 1 1.0341 0.1158 0.8070 1.2611 79.68 <.0001 Clinton*politview Yes Cons 0 0.0000 0.0000 0.0000 0.0000 . . Clinton*politview No Lib 0 0.0000 0.0000 0.0000 0.0000 . . Clinton*politview No Mod 0 0.0000 0.0000 0.0000 0.0000 . . Clinton*politview No Cons 0 0.0000 0.0000 0.0000 0.0000 . . Scale 0 1.0000 0.0000 1.0000 1.0000
The parameters associated with the interaction terms in the log-linear model are equivalent to those obtained in problem 9.2. For example: • The value of -0.92 (associated with voting for Clinton) indicates that for conservatives the odds of voting for Clinton are exp(-0.92) = 0.4; • The value of exp(1.8638) = 6.4 indicates that the odds of voting for Clinton are 6.4 times higher for liberals than for conservatives; • The value of exp(1.0341) = 2.8 indicates that the odds of voting for Clinton are 2.8 times higher for moderates than for conservatives. 9.4
Using the 2006 GSS data set: a. Comparing the model with the interaction to a model without it, G2 = 3407.959 3406.718 = 1.241. With df=2, this is not statistically significant. Thus, the effect of sex on the odds of favoring capital punishment is the same regardless of race (and/or vise versa).
Information Classification: General
Azen & Walker
Solutions
33
b. The equivalent log-linear comparison would be the saturated model vs. the homogeneous association model. This is because the 3-way interaction tested in this comparison represents whether the association between SEX and CAPPUN depends on RACE (or whether the association between RACE and CAPPUN depends on SEX), which is equivalent to what is modeled by the interaction effect in the logistic regression model. c. The parameter estimate for SEX (using male as the reference category) is -0.2964, so after controlling for race the ln(odds) of favoring capital punishment are lower for females than for males by 0.2964. The odds of favoring capital punishment for females are exp(-0.2964) = 0.744 times the odds for males. The parameter estimate for RACE=Black (using White as the reference category) is 1.2989 and the estimate for RACE=Other is -0.7514. Therefore, after controlling for sex the odds of favoring capital punishment are lower for blacks than for whites and lower for “other” races than for whites. Specifically, the odds of favoring capital punishment for blacks are exp(-1.2989) = 0.273 times the odds for whites, and the odds of favoring capital punishment for other races are exp(-0.7514) = 0.472 times the odds for whites. d. The equivalent log-linear model would contain all three 2-way interactions, so it would be the homogeneous association model. (Computer output of the parameter estimates for this model should be provided to show this equivalence.) e. The predicted probability that a black male would favor the death penalty is 0.47 using both models: • Using the interaction model: exp(1.2030 - 0.3428(0) – 1.3208(1) - 0.8977(0) + 0.0378(0)(1) + 0.2629(0)(0))/ [1 + exp(1.2030 - 0.3428(0) – 1.3208(1) - 0.8977(0) + 0.0378(0)(1) + 0.2629(0)(0))] = exp(-0.1178)/[1+ exp(-0.1178)] = 0.8889/1.8889= 0.47. • Using the main effects model: exp(1.1757 - 0.2964(0) – 1.2989(1) - 0.7514(0))/ [1 + exp(1.1757 - 0.2964(0) – 1.2989(1) - 0.7514(0))] = exp(-0.1232)/[1+ exp(-0.1232)] = 0.8841/1.8841= 0.47. 9.5
Using data from Table 9.7: a. Comparing the model with the interaction to a model without it, G2 = 98.222 - 97.944 = 0.278. With df=1, this is not statistically significant. Thus, the effect of treatment type on the odds of improving is the same regardless of sex (and/or vise versa). b. The equivalent log-linear comparison would be the saturated model vs. the homogeneous association model. This is because the 3-way interaction tested in this comparison represents whether the association between treatment and improvement depends on sex (or whether the association between sex and improvement depends on treatment), which is equivalent to what is modeled by the interaction effect in the logistic regression model. c. The parameter estimate for sex (using male as the reference category) is 1.4685, so after controlling for treatment the ln(odds) of improvement are higher for females than for males by 1.4685. The odds of improvement for females are predicted to be exp(1.4685) = 4.3 times the odds for males.
Information Classification: General
Azen & Walker
Solutions
34
The parameter estimate for treatment (using treated as the reference category) is 1.7816, so after controlling for sex the odds of improvement are lower for those in the placebo group than for those in the treatment group. Specifically, the odds of improvement for those in the placebo group are exp(-1.7816) = 0.2 times the odds for those in the treatment group. d. The equivalent log-linear model would contain all three 2-way interactions, so it would be the homogeneous association model. (Computer output of the parameter estimates for this model should be provided to show this equivalence.) e. The predicted probability that a treated male would improve are about 0.5 with both models: • From the interaction model: exp(0 - 2.3026(0) + 1.2528(0) + 0.6703(0))/ [1 + exp(0 - 2.3026(0) + 1.2528(0) + 0.6703(0))] = exp(0)/[1+ exp(0)] = 1/2 = 0.5. • From the main effects model: exp(-0.1220 - 1.7816(0) + 1.4685(0))/ [1 + exp(-0.1220 - 1.7816(0) + 1.4685(0))] = exp(-0.1220)/[1+ exp(-0.1220)] = 0.8851/1.8851= 0.47. 9.6
The model with both predictors and their interaction fits significantly better than the null (or empty) model: G2 = 31.46, df = 5, p < .0001. In addition, none of the standardized residuals appear overly large (i.e., more than |2|). By fitting a model with an interaction, we are allowing the relationship between fundamentalism level and favoring the death penalty to differ for males and females. Using "fundamental" and "male" as the reference categories, the estimated model is: log(odds of favoring the death penalty) = 1.386 - 0.499(Liberal) - 0.208(Moderate) - 0.865(Female) + 0.438(Liberal*Female) + 0.156(Moderate*Female). • The intercept is the expected value of the log odds for fundamental males. So the odds of exp(1.386) = 4 indicate that for fundamental males the probability of favoring the death penalty is 4 times the probability of opposing it. • The parameters associated with the fundamentalism levels can be interpreted for males. Since both of these parameters are negative, for males the odds of liberals or moderates favoring the death penalty (rather than opposing it) are lower than the same odds for fundamentalists. For example, for males, the odds of favoring the death penalty (rather than opposing it) for liberals are exp(-0.499) = 0.6 times the odds for fundamentalists. • The parameter associated with sex can be interpreted for fundamentalists. Since it is negative, for fundamentalists the odds of females favoring the death penalty (rather than opposing it) are lower than the same odds for males. Specifically, for fundamentalists, the odds of favoring the death penalty (rather than opposing it) for females are exp(-0.865) = 0.4 times the odds for males. • The parameters associated with the interaction terms can be interpreted as ratios of odds ratios. The odds ratios essentially compare the odds of favoring the death penalty (rather than opposing it) between females and males. The parameters compare these odds ratios across fundamentalism levels. Therefore, for example, the estimate of 0.438 indicates that the odds ratio is larger for liberals than for fundamentalists.
Information Classification: General
Azen & Walker
• •
Solutions
35
Specifically, the odds ratio (comparing the odds of favoring the death penalty across females and males) for liberals is exp(0.438) = 1.55 times the same odds ratio for fundamentalists. In fact, the odds ratio for liberals is 0.65 (indicating that the odds of favoring the death penalty is lower for females than for males) and the odds ratio for fundamentalists is 0.42 (also indicating that the odds of favoring the death penalty is lower for females than for males). Thus the odds ratio for liberals is 1.5 times the odds for fundamentalists: 0.42(1.55) = 0.65. The last parameter can be similarly interpreted. Finally, it should be noted that the interaction parameters are not significant indicating that the odds ratios (comparing the odds of favoring the death penalty across females and males) are statistically equivalent across fundamentalism levels. Other results can be seen in the table below:
Religious belief Fund. Mod. Lib. Fund. Mod. Lib.
Sex M M M F F F
Predicted log odds 1.39 1.18 0.89 0.52 0.47 0.46
Predicted odds 4.01 3.25 2.44 1.68 1.60 1.58
Predicted probability 0.80 0.76 0.71 0.63 0.62 0.61
9.7
Answers can vary. Combining Agree with Strongly Agree and Disagree with Strongly Disagree, the interaction between sex and race is not statistically significant. The effects of predictors are statistically significant in the main effects model, where the odds of agreement are lower for females than for males (odds ratio is 0.55) after controlling for race. In addition, after controlling for sex, the odds of agreement are lower for “other” races than for whites (odds ratio is 0.59) and higher for blacks than for whites (odds ratio is 5.3 times).
9.8
Answers will vary depending on variable chosen as response and categories combined.
9.9
First, the improvement variable must be recoded into two categories (improvement is indicated by improved > 0). The model with all interactions (including the 3-way interaction) does not converge properly, so its fit is questionable. The fit of the model with all 2-way interactions (-2LL = 88.4, df = 6) is not significantly better than the fit of the model with no interactions (-2LL = 92.1, df = 3), so the interactions are not necessary. Dropping any other effect from the model results in significantly worse fit, so the main effects model will be chosen as most parsimonious. This means that the effect of each of the predictors (sex, treatment, or age) on improvement does not vary by levels of the other two predictors. Using "treated" and "male" as the reference categories, the estimated model is: log(odds of improvement) = -2.7435 - 1.7598(Placebo) + 1.4878(Female) + 0.0487(age). • The intercept parameter indicates that for treated males of age 0, the odds of improving (rather than not improving) would be exp(-2.7435) = 0.06. However, the age of 0 is not a reasonable value for these data so the interpretation of the intercept is not meaningful.
Information Classification: General
Azen & Walker •
•
•
9.10
Solutions
36
The parameter associated with treatment group indicates that, after controlling for age and sex, the odds of improving (rather than not improving) are lower for those in the placebo group than for those in the treatment group. Specifically, the odds for those in the placebo group are exp(- 1.7598) = 0.17 times the odds for those in the treatment group. The parameter associated with sex indicates that, after controlling for age and treatment group, the odds of improving (rather than not improving) are higher for females than for males. Specifically, the odds for females are exp(1.4878) = 4.43 times the odds for males. The parameter associated with age indicates that, after controlling for sex and treatment group, the odds of improving (rather than not improving) increase with age. Specifically, as age increases by 1, the odds are multiplied by exp(0.0487) = 1.05 (which seems like a very moderate increase, although it is statistically significant).
Answers will vary depending on variables chosen.
Information Classification: General
Azen & Walker
Solutions
37
Chapter 10 10.1
Using the output provided: a. The Exp(B) value of 0.469 indicates that the odds of choosing chocolate rather than strawberry ice cream for males (i.e., when Female=0) is 0.469 times (i.e., less than half) the odds for females. b. The model to predict the preference of chocolate over strawberry ice cream from gender is: ln(odds of choosing chocolate over strawberry) = 0.098 - 0.758(Male). Thus, the predicted odds for choosing chocolate over strawberry is exp(0.098) = 1.1 for females and exp(0.098-0.758) = 0.52 for males.
10.2
Using the output provided: a. The model to predict the preference of vanilla over strawberry ice cream from gender is: ln(odds of choosing vanilla over strawberry) = 0.504 - 0.021(Male). Thus, the predicted odds of this preference is exp(0.504) = 1.66 for females and exp(0.504 - 0.021) = 1.62 for males, and the predicted probability of this preference is 1.66/2.66 = 0.62 for females and 1.62/2.62 = 0.62 for males. b. The model to predict the preference of chocolate over vanilla ice cream from gender can be derived by subtraction. Using the output provided: ln[P(chocolate)/P(vanilla)] = ln[P(chocolate)/P(strawberry)] - ln[P(vanilla)/P(strawberry)] = [0.098 - 0.758(Male)] - [0.504 - 0.021(Male)] = -0.406 - 0.737(Male). Using this formula, the predicted probability of preferring chocolate over vanilla ice cream is 0.40 for females and 0.24 for males.
10.3
Diabetic category is treated as a nominal outcome variable in this analysis. First, it becomes apparent that the estimation of models containing certain combinations of predictors does not converge and so these models are not valid. The only model with multiple predictors that can be validly estimated with these data is the model containing both INSTEST and SSPG, which yields a fit of -2LL = 144.1. All other valid models contain single predictors and the fit of each is shown below: Predictors in model GLUFAST GLUTEST INSTEST SSPG INSTEST SSPG
-2LL of model 121.1 29.2 241.7 172.3 144.1
From these results, it appears that the models containing either INSTEST or SSPG are more parsimonious than the model containing both. In addition, although the comparative fits of single predictor models cannot be tested statistically (as they are not nested models), it would appear that the model with only GLUTEST (test plasma glucose) provides a substantially better fit because its -2LL is quite low relative to the other models. Thus, this model will be chosen for further interpretation. • The likelihood ratio test indicates that GLUTEST is a significant predictor of diabetic category. • The logits are estimated as:
Information Classification: General
Azen & Walker
•
•
Solutions
38
Predicted ln(odds of “Chem. diabetic” rather than “normal”) = -90.37 + 0.22(GLUTEST) Predicted ln(odds of “Overt diabetic” rather than “normal”) = -109.80 + 0.25(GLUTEST) Thus, if the plasma glucose level is zero, the predicted odds of being "chemically" diabetic rather than normal would be exp(-90.37), which is practically zero. For every one unit increase in test plasma glucose levels the odds of being "chemically" diabetic rather than normal are expected to increase by a multiple of exp(0.22) = 1.25 (or by 125%). Similarly, if the plasma glucose level is zero, the predicted odds of being "overtly" diabetic rather than normal would be exp(-109.80), which is practically zero. For every one unit increase in test plasma glucose levels the odds of being "overtly" diabetic rather than normal are expected to increase by a multiple of exp(0.25) = 1.28 (or by 128%).
10.4
The model containing the interaction between sex and treatment cannot be properly estimated, so the main effects model was fit. Treatment = treated and sex = male were used as the reference categories for the predictors. The resulting model is: ln[P(improve=1)/P(improve=0)] = -1.66 - 1.11(Placebo) + 1.66(Female) and ln[P(improve=2)/P(improve=0)] = -0.35 - 2.17(Placebo) + 1.38(Female). Thus, for either improvement categories (1 and 2), the odds of improving rather than not are lower for those in the placebo group than for those in the treated group after controlling for sex. Similarly, the odds of improving rather than not are higher for females than for males after controlling for treatment group.
10.5
The fit of the model containing the interaction between sex and treatment is -2LL = 149.7 with df=3, and the fit of the main effects model is -2LL = 150.0 with df=2. Thus, the interaction term is not statistically significant and the main effects model is interpreted. The score test indicates that the proportional odds assumption is satisfied (2 = 1.88, df = 2, p = 0.39). The proportional odds model, using treatment = treated and sex = male as the reference categories for the predictors, is as follows: logit[P(at or below improve=0) = 0.02 + 1.80(Placebo) - 1.32(Female) and logit[P(at or below improve=1) = 0.87 + 1.80(Placebo) - 1.32(Female) For example, the odds of not improving (improve=0) rather than improving (improve = 1 or 2) are exp(.02) = 1.02 for a treated male, and these odds are higher if the person is in the placebo group but lower if the person is female.
10.6
The proportional odds assumption: a. In general, the assumption requires that the relationship between the predictors and the outcome is the same across all logits modeled. b. In problem 10.5 that would indicate that the relationship between the outcome and the predictors (or the slopes of 1.80 for group and -1.32 for sex) would be the same regardless of whether the outcome is the logit of the cumulative probability for no improvement (improve=0) or for some improvement (improve = 1). c. The test results indicate that the assumption is satisfied: X2 = 1.88, df = 2, p = 0.39.
Information Classification: General
Azen & Walker
Solutions
39
10.7
Using data from table 10.1 (see also summary table in answer to problem 10.8): a. logit[P(at or below level 1)] = -2.4 + 0.4(Male). b. For a boy the predicted odds of reaching the second proficiency level or less (rather than reaching a higher proficiency level) are exp(-2.4+0.4) = 0.135. For a girl these predicted odds would be exp(-2.4) = 0.091. c. The answer to part (a) provides both the intercept and slope using girls as the reference category. In part (b), both parameters are needed to predict the odds for boys but only the intercept is needed to predict the odds for girls. The intercept thus represents the predicted odds for girls and the slope represents the difference between boys and girls; that is, the odds for girls are multiplied by the exponentiated slope to obtain the odds for boys: 0.091*exp(0.4) = 0.091*1.49 = 0.135. d. logit[P(at or below level 0)] = -4.1 + 0.4(Male). Thus for a girl we would use the intercept to obtain the predicted odds of reaching the first proficiency level (rather than a higher level) as exp(-4.1) = 0.017. For a boy we would multiply these odds by the exponentiated value of the slope to obtain the predicted odds as 0.0166*exp(0.4) = 0.025.
10.8
The following table shows all results. The answers follow the table. Gender Y Level Cumulative Cumulative Cumulative Probability logit odds probability Boys 1 0 -3.7 0.025 0.024 0.024 2 1 -2.0 0.135 0.119 0.095 3 2 -0.7 0.497 0.332 0.213 4 3 1.2 3.320 0.769 0.437 5 4 2.4 11.023 0.917 0.148 Girls 1 0 -4.1 0.017 0.016 0.016 2 1 -2.4 0.091 0.083 0.067 3 2 -1.1 0.333 0.250 0.167 4 3 0.8 2.226 0.690 0.440 5 4 2.0 7.389 0.881 0.191 a. For a boy the logit of Y 4 is ln[P(Y 4) / P(Y > 4)] = 0.8 + 0.4 = 1.2, so the cumulative odds of Y 4 are exp(1.2) = 3.32 and the predicted cumulative probability is P(Y 4) = 3.32/4.32 = 0.77. Similarly, the logit of Y 3 is ln[P(Y 3) / P(Y > 3)] = -1.1 + 0.4 = -0.7, so the cumulative odds of Y 3 are exp(-0.7) = 0.50 and the predicted cumulative probability is P(Y 3) = 0.50/1.50 = 0.33. b. For a boy the probability is P(Y=4) = P(Y 4) - P(Y 3) = 0.77 - 0.33 = 0.44. For a girl, the probability would be: P(Y=4) = P(Y 4) - P(Y 3) = exp(0.8)/[1+exp(0.8)] - exp(-1.1)/[1+exp(-1.1)] = (2.23/3.23) - (0.33/1.33) = 0.69 - 0.25 = 0.44. c. For a boy the probability is P(Y=6) = P(Y 6) - P(Y 5) = 1 - 0.92 = 0.08. For a girl, the probability is P(Y=6) = P(Y 6) - P(Y 5) = 1 - 0.88 = 0.12.
Information Classification: General
Azen & Walker 10.9
Solutions
40
In the context of the data in problem 10.7, the proportional odds assumptions states that the effect of gender on proficiency, or the multiplicative difference between boys and girls in the cumulative odds of proficiency, is the same regardless of the proficiency category predicted. In this case specifically, the predicted cumulative logit is 0.4 higher for boys than for girls regardless of the proficiency level, so the cumulative odds for boys are exp(0.4) times larger for boys than for girls regardless of the proficiency level.
10.10 Answers will vary depending on variables selected.
Information Classification: General
Azen & Walker
Solutions
41
Chapter 11 11.1 Analyzing a data set consisting of a random sample of students who were selected from a random sample of schools: a. Conceptually, a random intercept model should be fit if we expect that the effect of attendance on the probability of proficiency will be the same in each school. A random slope model should be fit if we expect that the effect (i.e., slope) of attendance on the probability of proficiency might vary among the schools. b. Random intercept model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 𝛾00 + 𝛾10 (𝐴𝑇𝑇𝑐)𝑖𝑗 + 𝑈0𝑗 In this model, 𝛾00 represents the predicted log odds of proficiency for a student with average attendance in a random school, and 𝛾10 represents the change in the predicted log odds of proficiency as attendance increases by 1 day in a random school. We would also need to estimate the variance of the 𝑈0𝑗 terms, 𝜏00 , which represents the variability among the schools in the predicted log odds of proficiency. c. Random intercept model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 𝛾00 + 𝛾10 (𝐴𝑇𝑇𝑐)𝑖𝑗 + 𝑈0𝑗 + 𝑈1𝑗 (𝐴𝑇𝑇𝑐)𝑖𝑗 In this model, 𝛾00 represents the predicted log odds of proficiency for a student with average attendance in a random school, and 𝛾10 represents the change in the predicted log odds of proficiency as attendance increases by 1 day in a random school. We would also need to estimate the variance of the 𝑈0𝑗 terms, 𝜏00 , which represents the variability among the schools in the predicted log odds of proficiency at the average attendance value (school intercepts), the variance of the 𝑈1𝑗 terms, 𝜏11 , which represents the variability among the schools in the relationship between the log odds of proficiency and attendance (school slopes), and the covariance between the the 𝑈0𝑗 and 𝑈1𝑗 terms, which represents the covariance among the school intercepts and slopes. 11.2 Model with ATTc as the mean-centered attendance using the mean attendance of 150 days: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 2 + 0.4(𝐴𝑇𝑇𝑐)𝑖𝑗 + 𝑈0𝑗
a. The intercept of 2 represents the predicted log odds of proficiency for a student with average attendance in a random school, or predicted odds of exp(2) = 7.4. b. The slope of 0.4 represents the change in the predicted log odds of proficiency as attendance increases by 1 day in a random school. Thus, in a random school the odds of proficiency will be multiplied by exp(0.4) = 1.5 for each additional day of attendance. c. The predicted odds of proficiency for a student with average (mean) attendance in a randomly selected school would be exp(2) = 7.4 and the predicted probability would be 7.4/8.4 = 0.88.
Information Classification: General
Azen & Walker
Solutions
42
11.3 Suppose that the variance of 𝑈0𝑗 (i.e., 𝜏02 ) is estimated to be 0.3. a. This value is the variance in the predicted log odds from the model, which are for a randomly selected (or average) school but are expected to vary from school to school. b. This variance does not change the answer to 11.2b (fixed slope) but indicates the amount of variability (among schools) expected around the value reported in 11.2a (random intercept). 11.4 For the model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 1.8 + 0.35(𝐴𝑇𝑇𝑐)𝑖𝑗 + 𝑈0𝑗 + 𝑈1𝑗 (𝐴𝑇𝑇𝑐)𝑖𝑗 a. The intercept of 1.8 represents the predicted log odds of proficiency for a student with average attendance in a random school, or predicted odds of exp(1.8) = 6. b. The slope of 0.35 represents the change in the predicted log odds of proficiency as attendance increases by 1 day in a random school. Thus, the odds of proficiency will be multiplied by exp(0.35) = 1.4 for each additional day of attendance in a random school. c. The predicted odds of proficiency for a student with average (mean) attendance in a randomly selected school would be exp(1.8) = 6 and the predicted probability would be 6/7 = 0.86. 11.5 Suppose that the variance of 𝑈0𝑗 (i.e., 𝜏02 ) is estimated to be 0.2 and the variance of 𝑈1𝑗 (i.e., 𝜏12 ) is estimated to be 0.1. a. The value 0.2 is the variance among the schools in the predicted log odds of proficiency for a student with average attendance (intercept), which is expected to vary from school to school. The value 0.1 is the variance among the schools in the relationship between the predicted log odds of proficiency and attendance (slope), which is also expected to vary from school to school. b. The variance of 0.2 indicates the amount of variability (among schools) expected around the value reported in 11.2a (intercept), and the variance of 0.1 indicates the amount of variability (among schools) expected around the value reported in 11.2b (slope). 11.6 Analyzing a data set consisting of a random sample of patients who were selected from a random sample of clinics. a. Conceptually, a random intercept model should be fit if we expect that the effect of age on the probability of recovery will be the same in each clinic. A random slope model should be fit if we expect that the effect (i.e., slope) of age on the probability of recovery might vary among the clinics. b. Random intercept model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 𝛾00 + 𝛾10 (𝐴𝐺𝐸𝑐)𝑖𝑗 + 𝑈0𝑗 In this model, 𝛾00 represents the predicted log odds of recovery for a patient with average age in a random clinic, and 𝛾10 represents the change in the predicted log odds of recovery as age increases by 1 year in a random clinic. We would also need to estimate the variance of the 𝑈0𝑗 terms, 𝜏00 , which represents the variability among the clinics in the predicted log odds of recovery.
Information Classification: General
Azen & Walker
Solutions
43
c. Random intercept model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 𝛾00 + 𝛾10 (𝐴𝐺𝐸𝑐)𝑖𝑗 + 𝑈0𝑗 + 𝑈1𝑗 (𝐴𝐺𝐸𝑐)𝑖𝑗 In this model, 𝛾00 represents the predicted log odds of recovery for a patient of average age in a random clinic, and 𝛾10 represents the change in the predicted log odds of recovery as age increases by 1 year in a random clinic. We would also need to estimate the variance of the 𝑈0𝑗 terms, 𝜏00 , which represents the variability among the clinics in the predicted log odds of recovery at the average age value (clinic intercepts), the variance of the 𝑈1𝑗 terms, 𝜏11 , which represents the variability among the clinics in the relationship between the log odds of recovery and age (clinic slopes), and the covariance between the 𝑈0𝑗 and 𝑈1𝑗 terms, which represents the covariance among the clinic intercepts and slopes. 11.7 For the model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 3 − 0.2(𝐴𝐺𝐸𝑐)𝑖𝑗 + 𝑈0𝑗 a. The intercept of 3 represents the predicted log odds of recovery for a patient of average age in a random clinic, or predicted odds of exp(3) = 20.1. b. The slope of -0.2 represents the change in the predicted log odds of recovery as age increases by 1 year in a random clinic. Thus, in a random clinic the odds of recovery will be multiplied by exp(-0.2) = 0.82 (i.e., decrease) for each additional year of age. c. The predicted odds of recovery for a patient of average (mean) age in a randomly selected clinic would be exp(3) = 20.1 and the predicted probability would be 20.1/21.1= 0.95. 11.8 Suppose that the variance of 𝑈0𝑗 (i.e., 𝜏02 ) is estimated to be 0.4. a. The value 0.4 is the variance in the predicted log odds of recovery, which are for a randomly selected (or average) clinic but are expected to vary from clinic to clinic. b. This variance does not change the answer to 11.7b (fixed slope) but indicates the amount of variability (among clinics) expected around the value reported in 11.7a (random intercept). 11.9 For the model: 𝑙𝑜𝑔𝑖𝑡(𝜋𝑖𝑗 ) = 2.7 − 0.25(𝐴𝐺𝐸𝑐)𝑖𝑗 + 0.5(𝑆𝑇𝐴𝐹𝐹𝑐)𝑗 + 𝑈0𝑗 a. The intercept of 2.7 represents the predicted log odds of recovery for a patient of average age (50) in a clinic with the mean number of staff members (15), so the predicted odds are exp(2.7) = 14.9. b. This is a random intercept model because there is a random term (U) only for the intercept. Thus, both slopes are fixed. c. The predicted odds of recovery would be exp[2.7 − 0.25(15) + 0.5(5)] = exp(1.45) = 4.26 and the predicted probability would be 0.81. 11.10 Suppose that the variance of 𝑈0𝑗 (i.e., 𝜏02 ) is estimated to be 0.2. a. The value 0.2 is the variance in the predicted log odds of recovery, which are for a randomly selected (or average) clinic but are expected to vary from clinic to clinic. b. This variance indicates the amount of variability (among clinics) expected around the predicted log odds reported in problem 11.9 (i.e., 2.7 in part a and 1.45 in part c).
Information Classification: General