Hi All,
I'm using usual Cox regression where my outcome is time to a binary event. My variable of interest (a biological marker) appears to show a non-linear relationship with the outcome. I categorised it as 10 quantiles with the 6th as the reference category. The HR (with 95% CI) for categories 1-10, in that order, look like this:

1.29 (0.72 to 2.32)
2.16 (1.27 to 3.66)
0.98 (0.53 to 1.84)
1.51 (0.86 to 2.67)
1.71 (0.98 to 3.00)
Reference (6th category)
1.58 (0.91 to 2.76)
0.93 (0.49 to 1.76)
1.33 (0.75 to 2.36)
1.71 (1.01 to 2.96)

With the P for heterogeneity=0.020.

I would like to model this marker (say X) as a continuous variable such that it captures this non-linearity and hopefully gives a significant P-value. I've tried to model as X^2 but didn't work.

Please suggest. Thanks in advance.