For example, in this paper here (https://www.ahajournals.org/doi/full...AHA.120.020718) they look at this for a diet variable and CVD and state:
"We computed restricted cubic splines with 4 knots to visually assess the shape of association between ADPQS as a continuous variable (both time- varying average and 13- year change) and risk of CVD. Statistical significance of nonlinearity (ie, curvature) was tested by comparing the spline model with the linear model, and P values of <0.05 were regarded as statistically significant nonlinear relationship between the exposure and the outcome. Statistical significance of linearity was tested by comparing the linear model to the model including only the covariates, both using likelihood ratio tests."
They then report p-values for these results in text and with a figure (below).
"A monotonic decrease in CVD risk with time-varying average APDQS (P-nonlinearity=0.12 and P-linearity<0.001; Figure A) and the 13- year change in APDQS (P-nonlinearity=0.54 and P- linearity=0.04; Figure B) was observed in restricted cubic splines." Array
I know one can compare nested models to look at prediction level with LR tests (e.g. below link)...
https://stats.idre.ucla.edu/stata/fa...test-in-stata/
Code:
logit hiwrite female read estimates store m1 logit hiwrite female read math science estimates store m2 lrtest m1 m2
What would this Stata code look like in practice as a (quick/simple) example to compute these different p-values to compare the non-linear and linear models in this instance?
Thanks so much! I really appreciate your thoughts
Patrick
0 Response to Comparing cox proportional hazard linear and non-linear (restricted cubic spline) models using likelihood ratio test
Post a Comment