負の二項モデルの信頼区間
以前に当てはめたカニのモデルを引き続き使って、負の二項モデルの信頼区間をポアソン回帰モデルと比較します。
ポアソン回帰モデル crab_pois、負の二項モデル crab_NB、および crab データセットはワークスペースに事前読み込みされています。
この演習はコースの一部です
Pythonで学ぶ一般化線形モデル
演習の手順
crab_poisモデルの信頼区間を計算して表示します。crab_NBモデルの信頼区間を計算して表示します。
実践的なインタラクティブ演習
このサンプルコードを完成させて、この演習に挑戦してみましょう。
# Compute confidence intervals for crab_Pois model
print('Confidence intervals for the Poisson model')
____(____.____)
# Compute confidence intervals for crab_NB model
print('Confidence intervals for the Negative Binomial model')
____(____.____)