统计模型的线性回归

Linear regression with statsmodels

我正在尝试拟合在 statsmodels 库中实现的线性回归模型。误差项的分布是 (sigma>0 and dof>2) 的 t 分布,如下所示。

是否可以使用通用似然法在统计模型中产生这种似然?

这是 statsmodels 中 GenericLikelihoodModel 的测试和示例案例。

https://www.statsmodels.org/dev/generated/statsmodels.miscmodels.tmodel.TLinearModel.html TLinearModel 和如何实现通用最大似然模型的源代码。

部分示例在单元测试中https://github.com/statsmodels/statsmodels/blob/master/statsmodels/miscmodels/tests/test_tmodel.py