示例#1
0
文件: data.py 项目: jbrockmendel/sm2
def load_pandas():
    """Load the anes96 data and returns a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    """
    data = _get_data()
    return du.process_pandas(data, endog_idx=5, exog_idx=[10, 2, 6, 7, 8])
示例#2
0
def load_pandas():
    """Load the credit card data and returns a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    """
    data = _get_data()
    return du.process_pandas(data, endog_idx=0)
示例#3
0
def load_pandas():
    """
    Load the data modechoice data and return a Dataset class instance.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    """
    data = _get_data()
    return du.process_pandas(data, endog_idx=2, exog_idx=[3, 4, 5, 6, 7, 8])
示例#4
0
文件: data.py 项目: jbrockmendel/sm2
def load_pandas():
    """
    Loads the RAND HIE data and returns a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.

    Notes
    -----
    endog - response variable, mdvis
    exog - design
    """
    return du.process_pandas(_get_data(), endog_idx=0)
示例#5
0
文件: data.py 项目: jbrockmendel/sm2
def load_pandas():
    """
    Loads the Grunfeld data and returns a Dataset class.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.

    Notes
    -----
    raw_data has the firm variable expanded to dummy variables for each
    firm (ie., there is no reference dummy)
    """
    data = _get_data()
    data.year = data.year.astype(float)
    raw_data = pd.get_dummies(data)
    ds = du.process_pandas(data, endog_idx=0)
    ds.raw_data = raw_data
    return ds
示例#6
0
def load_pandas():
    data = _get_data()
    return du.process_pandas(data, endog_idx=8, exog_idx=None)
示例#7
0
文件: data.py 项目: jbrockmendel/sm2
def load_pandas():
    data = _get_data()
    dataset = du.process_pandas(data, endog_idx=0, exog_idx=None)
    dataset.censors = dataset.exog.iloc[:, 0]
    dataset.exog = dataset.exog.iloc[:, 1]
    return dataset
示例#8
0
文件: data.py 项目: jbrockmendel/sm2
def load_pandas():
    data = _get_data()
    return du.process_pandas(data,
                             endog_idx=2,
                             exog_idx=[7, 4, 3, 5],
                             index_idx=0)
示例#9
0
def load_pandas():
    data = _get_data()
    return du.process_pandas(data, endog_idx=['NABOVE', 'NBELOW'])