Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • mkspline / mkspline2

    Hi Statalist,

    I just recently started working with restricted cubic splines using the mkspline/mkspline2 commands, and have some trouble interpreting the regression coefficients. I tried searching the forum but did not find a clear answer to my questions; any help is greatly appreciated!
    1. The documentation of mkspline says the coefficients measure, by default, the slopes for the interval. But from what I understand, the interval between two knots is not linear for a cubic spline, so is this a sort of “average” slope across the interval? Or the slope at the knot? Or something else?
    2. When using the spline in a logistic regression model, can I simply – as usual – exponentiate the coefficient to obtain an OR for the interval?
    3. To determine whether a variable is “significantly” associated with the outcome, is it sufficient if one single slope “significantly” differs from 0, or is there some way to test the “overall significance” of the variable taking into account the whole range of values? I could imaging that multiplicity could be an issue if I test multiple slopes for one variable and conclude a “significant” relationship if one single slope happens to be significant.
    Thank you very much for any answers!

    Best regards,
    Patrick

  • #2
    1. I can't see any mention in the help [version 16] of "coefficients measure, by default, the slopes for the interval" and it's not true for restricted cubic splines. The only reference I can see to something like this in the help is example 1 for -mkspline- on page 1535 "With the marginal option, coefficients measure the change in slope from the preceding group." This statement only applies for linear splines. The short answer for restricted cubic splines is that the parameter estimates do not have a simple interpretation.

    2. No. The parameter estimates do not have a simple interpretation. You need to predict the OR for specific covariate values of draw a graph of the OR as a function of the variable of interest.

    3. No. You need to test all spline variables using for example, lrtest (likelihood ratio test) or testparm (Wald test).

    Comment


    • #3
      Thank you very much!

      Comment


      • #4
        Dear Paul (or other Statalist users who can help),

        just a quick follow up question, to make sure I have it correct when used the Wald test:

        For a spline variable with 4 knots and 3 coefficient estimates, I would use this syntax to jointly test the null-hypothesis that all coefficients are 0:

        test spline1 spline2 spline3

        Is this the correct approach to the problem?

        Thank you and best wishes,

        Patrick

        Comment

        Working...
        X