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.
The power of both model types thus depends on the number of events, as partial-likelihood calculations are only done at event times. Whatever methods you might use to estimate power for a Cox model should apply to a Fine-Gray regression.
As a first step, in clinical survival data you typically need about 10-20 events per regression coefficient that you are estimating. Otherwise you are at risk of overfitting the data. By that standard, you could have problems with modeling any of the event types with more than 1 covariate  except for the type with 30 events, which might allow for modeling 2 or 3 covariates.
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.
If you consider these data as pilot data for designing a future study, you could use them as a guide to such simulation. If these are all the data that you are likely to have, then a power calculation at this point is pretty useless: either you find significant results or you don't. See this page and its links.
