Docsity

Logistic Regression Analysis: Cereal Purchasing Behavior and Horse Racing Finish Positions, Exams of Statistics

Toggle sidebar
bg1
Logistic Example
CEREAL data (n = 71)
Response Y: The values are 1 (bought the cereal) and 0 (did not buy the cereal).
IVs: Count: the number of observations at each level of the response. For the cereal data, 22 adults bought the
cereal (1) and 49 adults did not buy the cereal (0).
Event: the reference event. For the cereal data, buying the cereal (1) is considered the reference event.
Output:
Logistic Regression Table
Odds 95% CI
Predictor Coef SE Coef Z P Ratio Lower Upper
Constant -3.01593 0.939357 -3.21 0.001
ViewAd
Yes 1.03419 0.571803 1.81 0.071 2.81 0.92 8.63
Children
Yes 1.43275 0.856498 1.67 0.094 4.19 0.78 22.45
Income 0.0137436 0.0194916 0.71 0.481 1.01 0.98 1.05
Log-Likelihood = -38.383
Test that all slopes are zero: G = 11.130, DF = 3, P-Value = 0.011
Interpretation:
The positive coefficient for ViewAd (1.03419) implies that an adult that has viewed the advertisement is more likely
to purchase the cereal than an adult that has not viewed the advertisement. Note that the reference level for ViewAd
is No.
Similarly, the positive coefficient for Children (1.43275) implies that an adult with children is more likely to
purchase the cereal than an adult without children. Note that the reference level for Children is No.
The positive coefficient for Income (0.0137436) implies that the greater the household income, the more likely a
subject is to purchase the cereal. This statement only applies to the range of household incomes in the sample, that
is, incomes less than $75,000. (The coefficient close to zero and the relatively large p-value suggest that this
association is not important. You would probably exclude this predictor and refit the model.)
Also, the odds of a reference event is the ratio of P(event) to P(not event). The estimated coefficient of a predictor
(factor or covariate) is the estimated change in the log of P(event)/P(not event) for each unit change in the predictor,
assuming the other predictors remain constant.
These estimated coefficients can also be used to calculate the odds ratio, or the ratio between two odds.
Exponentiating the estimated coefficient of a factor yields the ratio of P(event)/P(not event) for a certain factor level
compared to the reference level. The odds ratios at different values of the covariate can be constructed relative to
zero. In the covariate case, it may be more meaningful to interpret the odds and not the odds ratio. Note that an
estimated coefficient of zero or an odds ratio of one both imply the same thing-the factor or covariate has no effect.
pf2

Partial preview of the text

Download Logistic Regression Analysis: Cereal Purchasing Behavior and Horse Racing Finish Positions and more Exams Statistics in PDF only on Docsity!

Logistic Example CEREAL data (n = 71) Response Y : The values are 1 (bought the cereal) and 0 (did not buy the cereal). IVs: Count: the number of observations at each level of the response. For the cereal data, 22 adults bought the cereal (1) and 49 adults did not buy the cereal (0). Event: the reference event. For the cereal data, buying the cereal (1) is considered the reference event. Output: Logistic Regression Table Odds 95% CI Predictor Coef SE Coef Z P Ratio Lower Upper Constant -3.01593 0.939357 -3.21 0. ViewAd Yes 1.03419 0.571803 1.81 0.071 2.81 0.92 8. Children Yes 1.43275 0.856498 1.67 0.094 4.19 0.78 22. Income 0.0137436 0.0194916 0.71 0.481 1.01 0.98 1. Log-Likelihood = -38. Test that all slopes are zero: G = 11.130, DF = 3, P-Value = 0. Interpretation: The positive coefficient for ViewAd (1.03419) implies that an adult that has viewed the advertisement is more likely to purchase the cereal than an adult that has not viewed the advertisement. Note that the reference level for ViewAd is No. Similarly, the positive coefficient for Children (1.43275) implies that an adult with children is more likely to purchase the cereal than an adult without children. Note that the reference level for Children is No. The positive coefficient for Income (0.0137436) implies that the greater the household income, the more likely a subject is to purchase the cereal. This statement only applies to the range of household incomes in the sample, that is, incomes less than $75,000. (The coefficient close to zero and the relatively large p-value suggest that this association is not important. You would probably exclude this predictor and refit the model.) Also, the odds of a reference event is the ratio of P(event) to P(not event). The estimated coefficient of a predictor (factor or covariate) is the estimated change in the log of P(event)/P(not event) for each unit change in the predictor, assuming the other predictors remain constant. These estimated coefficients can also be used to calculate the odds ratio , or the ratio between two odds. Exponentiating the estimated coefficient of a factor yields the ratio of P(event)/P(not event) for a certain factor level compared to the reference level. The odds ratios at different values of the covariate can be constructed relative to zero. In the covariate case, it may be more meaningful to interpret the odds and not the odds ratio. Note that an estimated coefficient of zero or an odds ratio of one both imply the same thing-the factor or covariate has no effect.

Ordinal Logistic Regression Example

Horse racing data, (n=199) the response name is Finish.

Value - The levels of the ordinal response. For the horse racing data, the values are 1 (first), 2

(second), 3 (third), … , 8 (last). The reference event is 8, because it is the greatest numeric

value.

Count - The number of observations at each level of the response. For the horse racing data, this

horse won 22 races (1), finished second 25 times, finished third 28 times, and finished last 27

times.

There is also a covariate -- RACEODDS for each horse.

Logistic Regression Table Odds 95% CI Predictor Coef SE Coef Z P Ratio Lower Upper Const(1) -1.75308 0.241928 -7.25 0. Const(2) -0.810849 0.189384 -4.28 0. Const(3) -0.102543 0.175413 -0.58 0. Const(4) 0.381173 0.176127 2.16 0. Const(5) 0.981362 0.187390 5.24 0. Const(6) 1.72139 0.216391 7.95 0. Const(7) 2.42882 0.260417 9.33 0. RACEODDS -0.029010 0.007538 -3.85 0.000 0.97 0.96 0. Log-likelihood = -403. Test that all slopes are zero: G = 18.687, DF = 1, P-Value = 0.

For the horse racing data, because there are 8 values in the response information table, there are 7 logistic

equations. All equations assume a logit link.

The first equation is formed using the coefficients for Const(1) (-1.75308) and RaceOdds (-0.029010 ) in

the logistic regression equation. This binary logistic equation produces the probability that the horse

finishes first for the given odds.

The second equation is formed using the coefficients for Const(2) (-0.810849) and RaceOdds (-0.029010)

in the binary logistic regression equation. This binary logistic equation produces the probability of the

horse either finishing first or second for a given odds. The third equation is formed using the coefficients

for Const(3) (-0.102543) and RaceOdds (-0.029010) in the binary logistic regression equation. This

binary logistic equation produces the probability of the horse either finishing first, second, or third for a

given odds. The fourth through seventh equations are constructed and interpreted in the same way.

RaceOdds:

The negative coefficient for RaceOdds (-0.029010) implies that the higher the odds, the lower the

probability the horse has of winning the race.

For every one-unit increase in the predictor, RaceOdds, the chance of the horse finishing first versus

finishing second through eighth is reduced by a multiple of 0.97. Stated another way, the estimate

suggests a 3% decrease in the odds that the horse finishes first versus finishes second through eighth for

every one-unit increase in the predictor

The confidence interval of the odds ratio provides the range in which the odds ratio is expected to fall. In

this example, you can be 95% confident that the odds ratio will be between 0.96 and 0.99.