BaşlayınÜcretsiz Başlayın

Checking for overdispersion

In this exercise you will check for overdispersion in the model you fitted previously, namely the horseshoe crab Poisson model where you fitted sat given width. Recall from the video that to check for potential overdispersion in the fit you would compute the following

model.pearson_chi2 / model.df_resid

where .pearson_chi2 represents Pearson statistic and .df_resid represents the degrees of freedom of the residuals.

The model crab_pois and crab dataset are preloaded in the workspace.

Bu egzersiz

Generalized Linear Models in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Compute the ratio of the Pearson statistic and the degrees of freedom of the residuals for the crab_pois Poisson regression model.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Compute and print the overdispersion approximation
____(____.____ / ____.____)
Kodu Düzenle ve Çalıştır