'Use GLS to update the fixed effects parameter estimates.
Parameters
cov_re : array-like
The covariance matrix of the random effects.
Returns
The GLS estimates of the fixed effects parameters.'

def get_fe_params(self, cov_re, vcomp):

    if (self.k_fe == 0):
        return np.array([])
    if (self.k_re == 0):
        cov_re_inv = np.empty((0, 0))
    else:
        cov_re_inv = np.linalg.inv(cov_re)
    if (not hasattr(self, '_endex_li')):
        self._endex_li = []
        for (group_ix, _) in enumerate(self.group_labels):
            mat = np.concatenate((self.exog_li[group_ix], self.endog_li[group_ix][:, None]), axis=1)
            self._endex_li.append(mat)
    xtxy = 0.0
    for (group_ix, group) in enumerate(self.group_labels):
        vc_var = self._expand_vcomp(vcomp, group)
        exog = self.exog_li[group_ix]
        (ex_r, ex2_r) = (self._aex_r[group_ix], self._aex_r2[group_ix])
        solver = _smw_solver(1.0, ex_r, ex2_r, cov_re_inv, (1 / vc_var))
        u = solver(self._endex_li[group_ix])
        xtxy += np.dot(exog.T, u)
    fe_params = np.linalg.solve(xtxy[:, 0:(-1)], xtxy[:, (-1)])
    return fe_params
