statsmodels.miscmodels.tmodel.TLinearModel.nloglikeobs#

TLinearModel.nloglikeobs(params)[source]#

Negative loglikelihood of linear model with t distributed errors

Parameters:
paramsndarray

The parameters of the model. The last 2 parameters are degrees of freedom and scale.

Returns:
ndarray

The negative log likelihood of the model evaluated at params for each observation defined by self.endog and self.exog.

Notes

\[\ln f(x)=\ln\Gamma\left(\frac{df+1}{2}\right)-\ln\Gamma\left(\frac{df}{2}\right)-\frac{1}{2}\ln(df\pi)-\frac{df+1}{2}\ln\left(1+\frac{x^{2}}{df}\right)-\ln(scale)\]

where \(x=(y-X\beta)/scale\).

The t distribution is the standard t distribution and not a standardized t distribution, which means that the scale parameter is not equal to the standard deviation.

self.fixed_params and self.expandparams can be used to fix some parameters. (I doubt this has been tested in this model.)