Dears,
I'm using a restricted cubic spline regression to estimate the effect of one continuous variable on a binary outcome with the command:
mkspline2 exxx = exemp1, cubic displayknots
And then I plot the predictive margins and marginal effects using adjustrcspline and mfxrcspline.
So, I use the 5 default knots that are placed at equally spaced percentiles of the regressor's distribution (according to the Stata manual). My question is, can I use the spline with log(exemp1))?
I'm only finding an effect at low values of the regressor, which in addition accumulate most of the observations in my sample. With a log transformed variable I'll be able to visualize those effects much better, but I wonder if it is correct to combine it with the spline regression.
Thanks a lot for any clarification about this.
Mariela
I'm using a restricted cubic spline regression to estimate the effect of one continuous variable on a binary outcome with the command:
mkspline2 exxx = exemp1, cubic displayknots
And then I plot the predictive margins and marginal effects using adjustrcspline and mfxrcspline.
So, I use the 5 default knots that are placed at equally spaced percentiles of the regressor's distribution (according to the Stata manual). My question is, can I use the spline with log(exemp1))?
I'm only finding an effect at low values of the regressor, which in addition accumulate most of the observations in my sample. With a log transformed variable I'll be able to visualize those effects much better, but I wonder if it is correct to combine it with the spline regression.
Thanks a lot for any clarification about this.
Mariela
Comment