'Returns the fitted values for the model.
The fitted values reflect the mean structure specified by the
fixed effects and the predicted random effects.'

@cache_readonly
def fittedvalues(self):

    fit = np.dot(self.model.exog, self.fe_params)
    re = self.random_effects
    for (group_ix, group) in enumerate(self.model.group_labels):
        ix = self.model.row_indices[group]
        mat = []
        if (self.model.exog_re_li is not None):
            mat.append(self.model.exog_re_li[group_ix])
        for c in self.model._vc_names:
            if (group in self.model.exog_vc[c]):
                mat.append(self.model.exog_vc[c][group])
        mat = np.concatenate(mat, axis=1)
        fit[ix] += np.dot(mat, re[group])
    return fit
