'Returns the value of the gaussian log-likelihood function at params.
Given the whitened design matrix, the log-likelihood is evaluated
at the parameter vector `params` for the dependent variable `Y`.
Parameters
params : array-like
The parameter estimates.
Returns
llf : float
The value of the log-likelihood function for a WLS Model.
Notes
.. math:: -\frac{n}{2}\log\left(Y-\hat{Y}\right)-\frac{n}{2}\left(1+\log\left(\frac{2\pi}{n}\right)\right)-\frac{1}{2}log\left(\left|W\right|\right)
where :math:`W` is a diagonal matrix'

def loglike(self, params):

    nobs2 = (self.nobs / 2.0)
    SSR = np.sum(((self.wendog - np.dot(self.wexog, params)) ** 2), axis=0)
    llf = ((- np.log(SSR)) * nobs2)
    llf -= ((1 + np.log((np.pi / nobs2))) * nobs2)
    llf += (0.5 * np.sum(np.log(self.weights)))
    return llf
