Survival Analysis for data with repeated measures I am trying to study attrition amongst students during their 3 year bachelor's degree. If I measure values of various features every semester over a 3 year period (or any other frequency), only some features change over time, some don't. The student profile data such as what their Year 12 score was or if they are first in family to attend Uni doesn't change over time. But GPA, the number of units they enroll themselves in etc. changes with time. How can I handle this in Survival Analysis ? How can I account for the fact that the first 3 rows belong to 1 student and the next 2 to another student.
Note: It's more important for me to take into account the impact of changing values of some features on attrition (such as how study load went from 4 to 3 to 2) than to know at what point in their course they quit - which is good to know as well. Holistically considering the change in values of some features if it has resulted in attrition is what I want to know. If I do a binary classification, I am only considering a snapshot in time because I can have only 1 row per student but not the entire student experience.
Student   Year GPA    Year12-score First-in-family  Age Study-Load  Attrition
S1        Y1     4.5    78%             Yes          20  4           No 
S1        Y2     6.2    78%             Yes          21  3           No 
S1        Y3     6.1    78%             Yes          22  2           Yes
S2        Y1     8.2    82%             No           19  2           No
S2        Y2     6.9    82%             No           20  2           Yes

Also, given the fact that Student S1 attrited in Year 3, should I mark the Attrition Label as "Yes" for all 3 years ?
 A: This calls for analysis with time-varying covariates. The survival-analysis approach to this situation is covered by a vignette for the R survival package. You code each row of data with the Student ID of the individual,* the start time and stop times for a period of interest, whether the event occurred by the end of that time period, and the covariate values in place at the start of the time period (whether different from the previous time-period values or not). The event is modeled as depending on the covariate values in place just before the event time. (Don't fall into the trap of including covariates that change because of the event.)
If your data only include yearly values, you might better treat this as a discrete-time survival model, a binomial (e.g., logistic) model that includes the Year covariate as a fixed effect along with your other covariates.** That way you have one row of data for each individual for each year, along with the values of the time-dependent covariates for that year. As in the survival analysis, you set the binary Attrition marker to "Yes" only for the year when it happened.

*If there is only 1 event possible per student, then the ID isn't strictly necessary. It's critical if your model allows for a student to quit, return, and quit again; then you need to take into account the intra-individual correlations of the tendency to quit.
**Most survival analysis implemented by the R survival package assumes that time is continuous, so that ideally only 1 event only happens as any particular time. Although there are ways to deal with tied event times, if there are just a few time periods binomial modeling with Year as a fixed-effect predictor would be preferred.
