0

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)
nrennie
  • 1,877
  • 1
  • 4
  • 14
  • Please remove the RCS tag - that is not for restricted cubic spline, but rather for revision control system (https://en.wikipedia.org/wiki/Revision_Control_System?wprov=sfla1) – PJP Aug 05 '23 at 20:20

0 Answers0