how check for the functional form of continuous covariates competing risks model using Restricted cubic splines in R

50 views Asked by At

I have successfully fitted a competing risks model using Fine and Gray model (Melanoma data) but now the challenge is how to check for non-linear effects of continuous covariates(such as age) using Restricted cubic spline function in R

an R code on how to go about

I have tried using the following code by it is not working.

FGR(Hist(time,status)~Sex+ulcer+rcs(Melanoma$age, df=3),Melanoma)
0

There are 0 answers