6.7.10.1.8. statsmodels.sandbox.regression.tools.ts_lls

statsmodels.sandbox.regression.tools.ts_lls(y, params, df)[source]

t loglikelihood given observations and mean mu and variance sigma2 = 1

Parameters:

y : array, 1d

normally distributed random variable

params: array, (nobs, 2)

array of mean, variance (mu, sigma2) with observations in rows

df : integer

degrees of freedom of the t distribution

Returns:

lls : array

contribution to loglikelihood for each observation

Notes

parameterized for garch normalized/rescaled so that sigma2 is the variance

>>> df = 10; sigma = 1.
>>> stats.t.stats(df, loc=0., scale=sigma.*np.sqrt((df-2.)/df))
(array(0.0), array(1.0))
>>> sigma = np.sqrt(2.)
>>> stats.t.stats(df, loc=0., scale=sigma*np.sqrt((df-2.)/df))
(array(0.0), array(2.0))