Dear all, I have a question regarding the use of cubic splines as an interaction factor within a linear regression model.
In my case the outcome is mortality and I have only one predictor (province, variable "prov", 3 levels).
I used spline functions (variable "time", 7 nodes) as an interaction term to model the different mortality trend over time of the 3 provinces.
I'm having a hard time figuring out how to interpret the interaction coefficients.
For example, I understand that compared to the period of time 1 (the period before the first knot, 18 days) the mortality of the province 1 compared to the reference province decreases by 5.69.
It's correct?
Thank you very much in advance!
The whole output below:
In my case the outcome is mortality and I have only one predictor (province, variable "prov", 3 levels).
I used spline functions (variable "time", 7 nodes) as an interaction term to model the different mortality trend over time of the 3 provinces.
I'm having a hard time figuring out how to interpret the interaction coefficients.
For example, I understand that compared to the period of time 1 (the period before the first knot, 18 days) the mortality of the province 1 compared to the reference province decreases by 5.69.
It's correct?
Thank you very much in advance!
Code:
prov#c.time2 | 1 | -5.692354 .3235686 -17.59 0.000 -6.326537 -5.058171 2 | .6234578 .3235686 1.93 0.054 -.0107251 1.257641
Code:
. mkspline time=period, cubic displayknots nknots(7) | knot1 knot2 knot3 knot4 knot5 knot6 knot7 -------------+----------------------------------------------------------------------------- period | 18 127.264 237 347 457 566.736 676 . mixed letpm ib3.prov##c.time* Mixed-effects ML regression Number of obs = 2,079 Wald chi2(20) = 30909.08 Log likelihood = -6989.1022 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ letpm | Coefficient Std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- prov | 1 | -.0302228 1.790283 -0.02 0.987 -3.539114 3.478668 2 | 3.961484 1.790283 2.21 0.027 .4525932 7.470375 | time1 | .5075055 .017888 28.37 0.000 .4724457 .5425652 time2 | -8.232592 .2287976 -35.98 0.000 -8.681027 -7.784157 time3 | 22.54454 .6930546 32.53 0.000 21.18618 23.90291 time4 | -21.72282 .9505297 -22.85 0.000 -23.58582 -19.85982 time5 | 9.229315 .9854686 9.37 0.000 7.297832 11.1608 time6 | -2.798356 .9505318 -2.94 0.003 -4.661364 -.935348 | prov#c.time1 | 1 | .5111577 .0252974 20.21 0.000 .4615757 .5607396 2 | .0123322 .0252974 0.49 0.626 -.0372498 .0619142 | prov#c.time2 | 1 | -5.692354 .3235686 -17.59 0.000 -6.326537 -5.058171 2 | .6234578 .3235686 1.93 0.054 -.0107251 1.257641 | prov#c.time3 | 1 | 12.81385 .9801272 13.07 0.000 10.89284 14.73487 2 | -2.354465 .9801272 -2.40 0.016 -4.27548 -.4334513 | prov#c.time4 | 1 | -7.144312 1.344252 -5.31 0.000 -9.778997 -4.509626 2 | 3.172587 1.344252 2.36 0.018 .5379018 5.807273 | prov#c.time5 | 1 | -1.813644 1.393663 -1.30 0.193 -4.545173 .9178858 2 | -1.611369 1.393663 -1.16 0.248 -4.342899 1.12016 | prov#c.time6 | 1 | 2.381864 1.344255 1.77 0.076 -.2528274 5.016555 2 | -.0992673 1.344255 -0.07 0.941 -2.733959 2.535424 | _cons | 29.61729 1.265921 23.40 0.000 27.13613 32.09845 ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Random-effects parameters | Estimate Std. err. [95% conf. interval] -----------------------------+------------------------------------------------ var(Residual) | 48.69839 1.510436 45.82618 51.75062 ------------------------------------------------------------------------------
Comment