Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

MSIM4311 Business Intelligence and Data Mining

Individual assignment
Wong Hiu Wai
S147566
Code:
libname ass "/folders/myfolders";

proc logistic data = ass.gym_label descending;


class gender (ref = FIRST) discount (ref = FIRST) / param= ref;
model renew = gender discount year_with_co gender*discount;
run;

Y = renew
X​1 =​ gender
X​2 ​= discount
X​3 = ​ year_with_co

There are 336 observations in this data, where 166 members did not renew their membership
and 179 members renewed their membership.

Assume there is a significant interaction between gender and discount and that the estimated
coefficients.
Variable Coeff. (B)

Constant (year_with_co) -0.1337

gender -2.2899

discount -2.5441

intercept 0.5116

Intercept (gender * discount) 3.8887

Table of log-odds for each category of discount and gender:

discount

gender None (0) Discount (1)

Male (0) 0 -2.5441

Female (1) -2.2899 (-2.5441)+(-2.2899)+3.8887 =


-0.9453

Odds are calculated:

discount

gender None (0) Discount (1)

Male (0) 1 0.07854

Female (1) 0.1013 0.3886

If the customer is a male,


odds(discount)/ odds(no discount) = 0.07854 / 1 = 0.07854
For male customers, the odds of repurchase for discount decreases 1 - 0.07854 = 92.15 %.

If this is a female customer,


odds(discount)/ odds(no discount) = 0.3886 / 0.1013 = 3.836
For female customers, the odds of repurchase for discount is 3.836 times.

Hence, the effect of the variables on renew membership is dependent on the value of the third
variable.

You might also like