Spline-transform regression - concept clarification I am learning spline transformation and am confused about several concepts. Any guidance is all appreciated!

*

*Am I understanding this correctly: I should only spline-transform my continuous predictors if my logistic regression model does not have a good model fit?

*It appears that we cannot obtain the odds ratio from the spline-transformed logistic regression, is this correct? If so, how should I report the finding (as I always think odds ratio is the must-report outcomes in logistic regression)?

*Is it allowed to log transform some predictors and spline transform the others in my regression model or I 'MUST' keep their methods of transformation consistent?

 A: Note that Occam's razor applies only to two pre-specified models of the world.  It does not apply when one plays with multiparameter model fits in general.
You can get odds ratios even when fits are nonlinear; you just need to specify the low and high values of X over which you want the OR.
Don't think of a spline fit as something you try temporarily just to check goodness of fit against a simple linear in X model.  This will make you ignore model uncertainty in your final model, resulting in invalid p-values and confidence intervals.  All of these issues are discussed in detail in RMS and here.
A useful overall strategy is this:

*

*when the sample size is not tiny, use spline functions for continuous predictors not already known to act linear in the log odds

*you can test for linearity of effects to impress your boss that things are not simple and to help specify models on future datasets

*keep the spline for the current dataset.  The spline function with its multiple degrees of freedom properly penalize you for not knowing an effect is linear

*use partial effects plots, interquartile-range odds ratios, and nomograms to describe the result

A: Interesting questions!

*

*In general, if you have a simple method like a log transformation that does the same job comparably well as the more complicated method (spline transformation) stick to the simpler method. Think of Occam's razor. How do you evaluate "comparably well"? Use methods for model evaluation like information criteria, cross-validation etc.

*You still have an odds ratio, but the nonlinear effect of your covariate is not interpretable anymore because its effect on the odds ratio is not constant anymore. I think one way of reporting it, would be to just plot the nonlinear effect on the scale of the (log) odds ratio. I would argue that this is rather uncommon in the (applied) literature.

*It is perfectly fine to use different methods of transformation in the same model.

