Cox model: using strata() when one comparison group has small N I am comparing the survival of two unequally sized groups:
Group A, n = 10 000
Group B, n = 50
The analysis is controlled for three variables: p1, p2 and p3. As p3 violates the assumption of proportional hazards, I tried two options to overcome the problem.

*

*rcs(p3) - restricted cubic splines did not solve the problem

*strata(p3_binned) - I binned p3 into four, using quantiles. This solves the problem; however, can I use it when group B's sample size is small and I have 4 predictors in the model?

The model looks as follows:
S ~ group + p1 + p2 + strata(p3_binned)
Edit 2:
p3 has four bins, their sizes and events have given as follows:

*

*20 patients, 4 had an event


*8 patients, 5 had an event


*13 patients, 8 had an event


*9 patients, 6 had an event
 A: You at least have some events in each stratum for your small group of interest, so there's no reason not to proceed this way. Quoting from Therneau and Grambsch, page 45, there is a risk:

The major advantage of stratification is that it gives the most general adjustment for a confounding variable. Disadvantages are that no direct estimate of the importance of the strata effect is produced (no p-value), and that the precision of estimated coefficients and the power of hypothesis tests may be diminished if there are a large number of strata.

If you could get away with fewer strata to maintain PH you thus might be better off. If you can accept the precision in coefficient estimates you have found, then stratification per se shouldn't be a problem.
I do suspect, however, that there will be questions raised about how you are distinguishing a Group of only 50 individuals from a much larger Group of 10,000, and whether those Groups might differ in important outcome-associated predictors beyond those you included in your model. That's outside the scope of this question, however.
