You want to know the probability that someone will be in the
undergraduate state under specified conditions. You also seem to have data only for year-long time periods. So a simple approach would be to treat this as a logistic regression to predict the probability of that status at the end of each year-long time period.
For each individual you set an appropriate
time = 0, maybe the year that the individual finishes pre-undergraduate training. Label your outcome variable at the end of each time period as
undergraduate. With logistic regression, model the probability of state
1 at the end of the time period as a function of relevant predictors at the beginning of the time period: e.g.: age at study entry, the year that represents
time = 0 for the individual, demographic and socio-economic data potentially changing in each time period. The cumulative prior years as an undergraduate at the start of the time period would be critical to include; you might also want to include the state at the beginning of the time period as a predictor.
The standard data structure would be a "long" format in which each row of data has the individual ID, the time expressed relative to the individual's
time = 0 reference, the predictor values at the start of the time period, and the state of the individual at the end of the time period. Then logistic regression can model the probability of
undergraduate status pretty flexibly as functions of your predictors.* For any set of predictor variables, you then run predictions of probability in
undergraduate status as a function of time after
time = 0.
*This is essentially a discrete-time survival model that allows for transitions between two states. A related approach, particularly if you have data on actual transition times and not just status at the ends of annual time periods, would be a multi-state survival model. The R
survival package has a vignette on multi-state models. The diagram at the bottom right of Figure 1 is closest to your situation, with a reversible transition between
Illness corresponding to the transitions between your
non-undergraduate states. If you have information on
graduation, I suppose you could consider that to correspond to the
Death state in the figure.