Is there a way in R to include weights in a cox regression with Firth's penalized likelihood? I am trying to fit a propensity score weighted cox regression model in R. However, one of the treatment groups has zero events, so I also need to use an adjustment method (Firth's penalized likelihood).
I have been using the coxphf package just fine to run unweighted models, but there is not an argument that allows for the inclusion of weights in the same was that the regular coxph function allows. Any guidance would be much appreciated.
 A: An advantage of the Firth penalization (of the determinant of the Fisher information matrix) provided by coxphf(), its ability to provide profile-likelihood confidence intervals, is lost with a weighted regression.
As Noah reminded us in comments, and as Therneau and Grambsch explain in Section 7.3, partial likelihood maximization with a weighted model treats each weight as the number of independent cases having the same covariate values and outcomes. As that's not the situation with propensity weights, profile-likelihood confidence intervals in your situation would be artificially small. Robust coefficient (co)variance estimates are required. You might find a way to incorporate a Firth penalty into the user-defined penalization allowed for in coxph() and deal with the matter that way.
If you want to use Firth penalization and can't find a way to incorporate that into a coxph() penalty, a work-around for a point estimate via coxphf() would be to expand your data set so that you have integer numbers of cases in proportion to their propensity weights. Noah's idea to bootstrap the entire process, including the propensity-weight estimates, could then provide a robust confidence interval (although I recommend that you explain how one limit could be infinite, given the lack of events under one treatment).
You also could consider ridge regression as an alternate penalization method, penalizing the sum of squares of the regression coefficients. A ridge() term in a coxph() model can do that directly, although you should think about how much penalty to impose. There might be some advantage in using the tools in the glmnet package for cross-validation of ridge models and penalty selection, although I'm not sure how well that would behave with no events under one treatment.
