Solution (source code)

= Solution

Age changes during follow-up, so the <generator matrix> $Q(s)$ changes with time. The <transition matrix> must solve $\partial_{t_2}P(t_1,t_2)=P(t_1,t_2)Q(t_2)$, with $P(t_1,t_1)=I$. It is generally not the <matrix exponential> of one constant matrix; even $\exp(\int Q(s)\,ds)$ is not generally valid because the matrices at different times need not commute.

For example, write the age-dependent onset rate as $\lambda(s)$ and keep progression rate $\nu$ constant. Then
$$
P_{12}(t_1,t_2)=\int_{t_1}^{t_2}\lambda(u)\exp\left(-\int_{t_1}^u\lambda(v)\,dv\right)e^{-\nu(t_2-u)}\,du.
$$
Even when the integrated onset rate is elementary, this remaining integral need not have an elementary closed form. Special cases can have closed forms; time dependence does not by itself prove universal impossibility.

For a tractable <likelihood function>, freeze age at its left-endpoint value, or a midpoint value, on each observation interval $[t_j,t_{j+1})$. The genetic <covariate> is already constant. This <piecewise-constant covariate approximation> gives a constant matrix $Q_j$ on each interval and \b[a product of closed-form interval probabilities]:
$$
\boxed{L=\prod_j\left[e^{Q_j(t_{j+1}-t_j)}\right]_{x_jx_{j+1}}.}
$$
Here $x_j$ is the observed state at $t_j$, and the <likelihood function> is conditional on the initial state. The approximation improves when intervals are short relative to the variation in the age effect.