Announcement

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

  • stset scale(30.455) vs. datedifffrac

    Hello all:

    I note a slight difference between months elapsed using -datediff_frac- function and the _t in stset with the scale option using date of censor (docens) and date of diagnosis (dodx). What would the appropriate way to set the scale to show in months ? Is 30.455 a reasonable approximation in scale?

    gen tos = datediff_frac(dodx,docens,"month")
    format tos %9.1f
    label variable tos "Time from Dx to study exit(months)"


    stset tos, fail(dead)


    vs.

    stset docens, origin(time dodx) fail(dead) scale(30.455)
Working...
X