CommencerCommencer gratuitement

Statistical significance

In the video we analyzed the horseshoe crab model by predicting y with weight. In this exercise you will assess the significance of the estimated coefficients but with width as explanatory variable instead.

Recall that coefficients help us determine the significance of the relationship that we are trying to model, where a positive sign increases the probability of an event as the predictor increases and vice versa.

The dataset crab is loaded in the workspace.

Cet exercice fait partie du cours

Generalized Linear Models in Python

Afficher le cours

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Import libraries and th glm function
import ____.api as sm
from ____.____.api import ____

# Fit logistic regression and save as crab_GLM
crab_GLM = ____('____ ~ ____', data = ____, family = sm.families.____).____

# Print model summary
____(____.____)
Modifier et exécuter le code