'fit the model to a given endogenous variable Y
This needs to change for consistency with statsmodels'

def fit(self, Y, rtol=1e-06, maxiter=30):

    self.rtol = rtol
    self.maxiter = maxiter
    self._iter__()
    mu = 0
    alpha = ((Y * self.weights).sum() / self.weights.sum())
    offset = np.zeros(self.exog.shape[1], np.float64)
    for i in range(self.exog.shape[1]):
        self.smoothers[i].smooth(((Y - alpha) - mu), weights=self.weights)
        tmp = self.smoothers[i].predict()
        offset[i] = ((tmp * self.weights).sum() / self.weights.sum())
        tmp -= tmp.sum()
        mu += tmp
    self.results = Results(Y, alpha, self.exog, self.smoothers, self.family, offset)
    while self.cont():
        self.results = self.next()
    if (self.iter >= self.maxiter):
        warnings.warn(iteration_limit_doc, IterationLimitWarning)
    return self.results
