6.7.10.1.5. statsmodels.sandbox.regression.tools.norm_lls_grad

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

Jacobian of normal loglikelihood wrt mean mu and variance sigma2

Parameters:

y : array, 1d

normally distributed random variable

params: array, (nobs, 2)

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

Returns:

grad : array (nobs, 2)

derivative of loglikelihood for each observation wrt mean in first column, and wrt variance in second column

Notes

this is actually the derivative wrt sigma not sigma**2, but evaluated with parameter sigma2 = sigma**2