'If all is False, the first variable name is dropped'

def _get_endog_name(self, yname, yname_list, all=False):

    model = self.model
    if (yname is None):
        yname = model.endog_names
    if (yname_list is None):
        ynames = model._ynames_map
        ynames = self._maybe_convert_ynames_int(ynames)
        ynames = [ynames[key] for key in range(int(model.J))]
        ynames = ['='.join([yname, name]) for name in ynames]
        if (not all):
            yname_list = ynames[1:]
        else:
            yname_list = ynames
    return (yname, yname_list)
