Poisson 置信区间
使用先前拟合的马蹄蟹模型 sat ~ width,通过计算 \(\beta_1\) 的置信区间,以及对均值的乘法效应的置信区间,来分析系数估计的不确定性。
model 对象和 crab 数据集已预加载到工作区。
本练习是课程的一部分
Python 中的广义线性模型
练习说明
- 使用
.conf_int()函数提取置信区间,并保存为 model_ci。 - 计算对均值的乘法效应的置信区间。
交互式实操练习
通过完成这段示例代码来试试这个练习。
# Compute confidence intervals for the coefficients
model_ci = ____.____
# Compute and print the confidence intervals for the multiplicative effect on the mean
____(np.____(____))