I want to run a binary logistic regression and I guess some variables have nonlinearities. So I want to use splines method to understand affect of each range in a continuous variable. When I 'guess' that nonlinearities it will enough to using splines method or I should run a 'test' on variables?
Asked
Active
Viewed 72 times
0
-
See https://stats.stackexchange.com/questions/122212/logistic-regression-with-regression-splines-in-r. I don't think you should be running any tests! – kjetil b halvorsen Feb 19 '23 at 03:20
-
Thank you so much. – Mostafa Ahmadi Feb 19 '23 at 03:28
-
Is this a good method if I run binary logistic regression for each continuous variable WITH and WITHOUT splines, then I compare their AIC and WALD p-values, and then determine if it's better to use the splines method or not? – Mostafa Ahmadi Feb 19 '23 at 22:08