Dear all, I have a problem about P for non-linearity for restricted cubic spline model.
we assessed the association between serum biomarker levels and the 10-year risk of events.
We found a significant association by categorizing the exposure into quartiles (same results when using teritles or quintiles)
A reviewer was interested in the shape of the association and asked us to do a spline analysis becoz the HR in the highest quartile was very high.
So we used the SAS ’effect’ statement (proc phreg ) to do a restricted cubic spline analysis. The plot was like this
Figure 1|222x500
But we can’t find a way to calculate the P-value for non-linearity. Do you have any suggestions for me?
Some paper published on BMJ wrote like “We tested for potential non-linearity by using a likelihood ratio test comparing the model with only a linear term against the model with linear and cubic spline terms”.
so it seems like P_value=1-probchi(LRT,df); (LRT is the difference of the likelihood-ratio statistic between two models: -2Log L )
I am not sure if this is right.
And I tried this method. However, when I put both the original exposure variable (continous, almost normal distributition) and the new spline exposure variable (from the effect statement) into the same model (multivariable-adjusted), there was a parameter estimate for the spline term, but not for the original variable term.
So may I just compare the log-likelihood of the model containing the linear term with that of the model containing cubic spline terms?
My understanding is that this likelihood ratio test is testing whether the model with the spline term has the same goodness of fit with that of the model with the linear term. In this case, the model with the spline term had a better goodness of fit, is it proper to say there is a nonlinear association.