levels by levels interactions Given a dataset as below
day      id  time_with_new_teach time_in_prog dur_train dur_appr age graduated
2020-01  02  20                  35           4         9        20  no
2020-01  19  10                  20           9         19       20  no
2020-02  02  21                  36           5         10       21  yes
2020-01  03   1                   4           3          7       29  no
....
2020-01  09  24                  45           20        19       20  yes

Using graduated as the outcome, which kind of model/packages can i use to determine impact of switching teachers (time_with_new_teach) and time in program (time_in_prog) on graduation probability? Ideally I would like to know if you change your teacher within 6 months, your graduation likelihood increases or decreases by x%. Also for people with time in program over 20 months (time_in_prog > 20), changing your teacher in 6 months (time_in_prog <= 6) leads to x% decrease in graduation probability.
 A: The outcome graduated is binary, so you need a  model for binary data such as a logistic model.
There appears to be repeated measures within id so you need to account for correlations within id. You could use a model with random effects for id to do so.
To answer your research questions you can fit a model with fixed effects for time_with_new_teach and time_in_prog, and possibly the interaction between them.
Since you seem to be interested in a cut-off point for these variables, then you may want to dichotomize them - however this always results in a loss of statistical power and it might be the case that there are interesting associations among the variables that will be lost if you dichotomize, so I would strongly suggest trying to work with the original variables first.
Such a model would be a generalise linear mixed model (glmm) and using the logit link function it will model the odds of graduation, so you can obtain odds ratios for the fixed effects - that is, the % change in odds of graduation between for a 1 unit change in the variables (if using the the original variables), or between the groups (if using dichotomized variables)
