I have a competing risks model where every observation starts in state 0 and ends up in either state 1 or state 2.
I have the following cumulative hazard functions for each transition to state 1 and 2.
I am interested in finding the probability that an observation is in state 1 or state 2 at time t.
Currently, I write a for-loop where the observation starts in state 1 and then I use the hazard ratios to divvy up the proportion of the observation remaining in state 0 to either state 1 or state 2. This seems cumbersome, and I was wondering if there's a closed form approach for this.