简体   繁体   中英

Linear regression with statsmodels

I am trying to fit a linear regression model implemented in statsmodels library. The distribution of the error term is a t-distribution with (sigma>0 and dof>2) as depicted below.

Is it possible to produce such a likelihood in statsmodels, making use of generic likelihood method?

在此处输入图片说明

This is a test and example case for GenericLikelihoodModel in statsmodels.

see https://www.statsmodels.org/dev/generated/statsmodels.miscmodels.tmodel.TLinearModel.html for the TLinearModel and the source code for how to implement generic maximum likelihood models.

Some examples are in the unit tests https://github.com/statsmodels/statsmodels/blob/master/statsmodels/miscmodels/tests/test_tmodel.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM