Exercise

The effect of multicollinearity

Using the crab dataset you will analyze the effects of multicollinearity. Recall that multicollinearity can have the following effects:

  • Coefficient is not significant, but variable is highly correlated with \(y\).
  • Adding/removing a variable significantly changes coefficients.
  • Not logical sign of the coefficient.
  • Variables have high pairwise correlation.

Instructions

100 XP
  • Import necessary functions from statsmodels library for GLMs.
  • Fit a multivariate logistic regression model with weight and width as explanatory variables and y as the response.
  • View model results using print() function.