Announcement

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

  • Struggling with -mkspline-

    I'm struggling on interpreting the output after using the mkspline command.

    I have a continuous exposure (N=721) called "norepi_equi_x" and want to model this independent variable using a competing risk model for three possible outcome: 1) event of interest, and (2) competing event, where participants are censored by 96 hours.

    mkspline sp_vp = norepi_equi_x, displayknots cubic


    knots are then located as below:

    | knot1 knot2 knot3 knot4 knot5
    -------------+-------------------------------------------------------
    norepi_equi_x | .02 .05 .1 .2 1.0564


    stset rtime, failure(rstatus==1) exit(time 96)
    stcrreg sp_vp* age i.sex elixsum ap2_admit sofa_score_day_before_ext i.icu_class i.admission_type, vce(cluster icu_site) compete(rstatus==2)


    Click image for larger version

Name:	x.JPG
Views:	1
Size:	19.7 KB
ID:	1632996


    I don't quite understand how to trouble shoot what is going with these non-sensical results.

    The distribution of my exposure variable (and this captures the dose of a medication):

    Click image for larger version

Name:	y.JPG
Views:	1
Size:	24.3 KB
ID:	1632997



    The first spline models the exposure as a linear relationship, which isn't appropriate for this setting. I don't now how to troubleshoot why each of the subsequent splines don't produce a result.

    Thank you for your help.

  • #2
    Your norepi_equi_x is strongly skewed -- and by default some knots will be very close together, as Stata is telling you -- so spline construction is problematic here.

    You might try fewer knots or choosing knot locations deliberately.

    Some experiments indicate that transforming it will help a bit, say by using asinh() as you have an exact zero.

    Do you expect a complicated dependence on this predictor? Why not see how far adding a square term helps?

    Most radically, if a predictor doesn't help, leave it out.

    Comment

    Working...
    X