'Calculates the expected conditional mean
m(X, Z=l) for all possible l'

def _est_cond_mean(self):

    self.dom_x = np.sort(np.unique(self.exog[:, self.test_vars]))
    X = copy.deepcopy(self.exog)
    m = 0
    for i in self.dom_x:
        X[:, self.test_vars] = i
        m += self.model.fit(data_predict=X)[0]
    m = (m / float(len(self.dom_x)))
    m = np.reshape(m, (np.shape(self.exog)[0], 1))
    return m
