Aan de slagGa gratis aan de slag

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.

Deze oefening maakt deel uit van de cursus

Generalized Linear Models in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# 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
____(____.____)
Code bewerken en uitvoeren