# How to calculate the sample size (minimal observations needed per event) to perform competing risks regression analysis?

I want to perform a competing risks regression analysis. There are 3 competing risks + censored data. I would like to know if there is a way to calculate the minimal observations I will need per event to have enough statistical power.

For example, I have 40 observations of patients that finish the treatment without any competing event. For the 3 competing risks, I have 30, 10, and 8 observations. Is it enough? I'm using crr() function from cmprsk package in R. How can I calculate the statistical power with these observations? How can I make sure I have enough observations to understand if the hazard of covariates comparing to the baseline is close to reality? Any R function I can use to calculate the statistical power? I appreciate any help you can provide.

The Fine-Gray competing-risks regression is fit similarly to a Cox model. The difference in a Fine-Gray regression is that individuals who experience one type of event are still included in the risk sets for the other event types (in a weighted way) at times after their own events. Otherwise, the calculations at event times are the same. That's probably easier to glean from Section 4 of the competing risks vignette in the R survival package than from the necessarily terse description in the cmprsk help pages or the associated primary literature.
That's not a complete answer to your question about power. A power calculation needs to incorporate the magnitude of effect that you hope to discern, which you don't specify. For complicated situations like competing risks, power might best be estimated by simulating large amounts of data of the type you expect to find, for example with the R simsurv package, and then performing multiple models at each of several different sample sizes.