My name is Abhi & I am trying to better understand logistic regression by solving a few practice problem. I am using R and RStudio as the development environment

Problem Statement
Given the age, sex and class(first,second,third) for each passenger can you predict if he survived or died when the titanic sank

Simple Logistic Regression. Use age,sex and passenger class directly. The formula (in R) Survived~Pclass+Sex+Age

This gives fairly decent results - accuracy of 79% and all of independent variables are statistically significant

Add interactions between age,sex and passenger class. Accuracy has improved to 80% but age is no longer significant. Also none of the new terms(age-sex,age-class,sex-class,age-sex-class) are statistically significant. The formula (in R) Survived~Pclass*Sex*Age

Can some one explain why this is happening? I can accept that the new terms may not be significant but why is age no longer significant?

Any help would be much appreciated


1 Answer 1


This is because the variables together are explaining the same variance in the output space. Thus, the fit obtained with Pclass (along with the new added covariation effect) is already accounting for the variance explained by the age variable alone and hence age is showing up as insignificant.

  • $\begingroup$ I guess its a bit counter intuitive to me that the fit for age is being explained by passenger class. Neither age, nor class-age nor sex-age is statistically significant $\endgroup$
    – Abhi
    Jul 30, 2014 at 4:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.