'Called by test_kurt.  This function is optimized over
nuisance parameters mu and sigma
Parameters
nuis_params : 1darray
An array with a nuisance mean and variance parameter
Returns
llr : float
The log likelihood ratio of a pre-speified kurtosis holding the
nuisance parameters constant'

def _opt_kurt(self, nuis_params):

    endog = self.endog
    nobs = self.nobs
    mu_data = (endog - nuis_params[0])
    sig_data = (((endog - nuis_params[0]) ** 2) - nuis_params[1])
    kurt_data = (((((endog - nuis_params[0]) ** 4) / (nuis_params[1] ** 2)) - 3) - self.kurt0)
    est_vect = np.column_stack((mu_data, sig_data, kurt_data))
    eta_star = self._modif_newton(np.array([(1.0 / nobs), (1.0 / nobs), (1.0 / nobs)]), est_vect, (np.ones(nobs) * (1.0 / nobs)))
    denom = (1 + np.dot(eta_star, est_vect.T))
    self.new_weights = (((1.0 / nobs) * 1.0) / denom)
    llr = np.sum(np.log((nobs * self.new_weights)))
    return ((-2) * llr)
