I have a repeated measures data set with time as the independent variable and a single dependent variable, y. That is, for each subject, I have a certain (small, from 1 to 3) number of measurements. The maximum time point of all measurements is a certain clinical event (diagnosis).
Visually, I see that until (roughly) a certain time point, y is independent of time. However, as the measurements approach the time of diagnosis, I can see that the measured variable starts to rise. In principle, this is the relationship that I think I observe:
$$ y(x) = \begin{cases} a & x < x_1\\ a + bx & x \ge x_1\\ \end{cases} $$
My question is: how to get an estimate and confidence intervals of $x_1$.