def getind(dataset, wid, spec):
    """
    Specifies individual dataset for column 2 and 3 of table 2:
    In column 2 early decisions are considered while in column 3
    late decisions are considered. For col 1 and 4 all decicions
    are taken into account.

    Args:
        dataset(Pd.DataFrame): dataset containing all considered individuals
        wid(int): Individual ID
        spec(int): specification parameter
    Returns:
        dataset_ind(Pd.DataFrame):  Relevant individual-level dataframe
            containing only observations for individual whose ID=wid.

    """
    dataset_ind = dataset[dataset.wid == wid]
    if spec == 2:
        dataset_ind = dataset_ind[dataset_ind.decisiondatenum < 4]
    elif spec == 3:
        dataset_ind = dataset_ind[dataset_ind.decisiondatenum >= 4]
    return dataset_ind