I’m currently undertaking individual participant data meta-analysis evaluating the predictive performance of a continous variable (X) and incidence of tuberculosis.
The goal is to plot the predicted cumulative risk of TB vs levels of X so that to show how quantitative values of X predict the risk of TB.
I would like to use mixed effects cox-regression with time-to TB incidence as an outcome and X as exporsure using restricted cubic splines with random effects.
I found mlrcs package but it cannot be used for Cox and it seems rcs in Hmisc cannot be used with mixed effects cox regression.
How can I use RCS for for a continous variable with random effects in cox regression with R?