Announcement

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

  • stci with scale(12) vs. scale (265.25)

    I am trying to compute median and range of overall survival in months after transformation for my data. When I use scale of 365.25, stci displays median and range, but when I change the scale to 12 and do the analysis, it gives nothing. What am I doing wrong? I would like the scale of years for the K-M plots but want to display median survival by months.

    My code:
    stset datelfu, failure(vital == 0) origin(time dotrans) exit(time dotrans + 365.25* 4) scale(365.25) // Final 4 year OS after transformation...thanks to Clyde pointing that it is origin and not enter
    stci, by(age65)

    vs

    stset datelfu, failure(vital == 0) origin(time dotrans) exit(time dotrans + 12 * 4) scale(12) // Final 4 year OS after transformation...thanks to Clyde pointing that it is origin and not enter
    stci, by(age65)

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float age65 int(dotrans datelfu) byte vital
    0 20783 21381 0
    1 20423 22581 1
    1 20620 22586 1
    0 20529 21011 0
    1 20836 20860 0
    1 20977 21281 0
    1 20996 22530 1
    1 20831 21160 0
    1 21011 21197 0
    1 20915 21130 0
    0 19876 20691 0
    0 20620 20823 0
    1 19998 20761 0
    0 19757 20188 0
    0 20237 20258 0
    1 20173 20248 1
    0 19429 20194 0
    1 19927 22572 1
    1 20121 20383 0
    1 19956 20283 0
    1 20200 20382 1
    0 20230 20392 0
    1 20251 20389 0
    0 20370 22418 1
    1 19170 20466 0
    0 20180 20761 0
    0 19849 22575 1
    0 19586 22085 1
    0 19921 19960 1
    1 19670 19997 1
    1 19502 19567 0
    1 19600 19600 1
    0 19677 19835 0
    0 18992 19050 0
    1 19275 19320 1
    0 19302 22581 1
    1 18827 18830 1
    0 18956 18968 0
    0 18382 18695 0
    0 18016 18370 0
    1 18051 18066 0
    1 17904 18009 1
    1 17507 17752 0
    1 17722 17948 1
    1 17766 17825 0
    0 17729 17846 1
    1 17876 17876 1
    1 17157 17178 1
    1 17176 17226 0
    0 16919 17454 0
    0 17283 17425 0
    1 17372 19156 1
    0 16912 16918 0
    0 16663 17124 0
    1 16802 17162 0
    0 16713 16713 1
    0 16712 17631 1
    0 16439 16454 0
    1 16432 17173 1
    0 16301 16439 0
    1 16099 16190 0
    0 15937 16119 1
    1 15874 15882 0
    0 15767 16133 1
    0 15308 16415 1
    1 15628 15628 1
    0 15111 15701 0
    0 15606 15962 1
    0 15349 15361 0
    0 15200 15340 0
    1 14610 15349 0
    0 15013 15045 1
    0 14735 14940 0
    1 14676 14792 0
    1 21084 21262 0
    1 21172 21181 1
    1 21286 22078 0
    0 21049 21715 0
    1 21355 21633 0
    1 21538 21574 1
    1 21613 22677 1
    1 21620 22428 1
    1 21726 21868 0
    1 21964 21978 0
    1 21448 22571 1
    1 22102 22152 1
    0 22147 22580 1
    1 22179 22221 0
    1 22217 22587 1
    1 22302 22323 1
    1 22335 22476 0
    1 19709 21362 1
    1 20626 21591 0
    1 21097 22672 1
    1 20985 22300 1
    1 19358 19358 1
    0 22630 22700 1
    1 22679 22699 1
    1 21165 21179 1
    0 20851 22599 1
    end
    format %td dotrans
    format %td datelfu
    label values age65 age2
    label def age2 0 "<65 years", modify
    label def age2 1 ">=65 years", modify
    label values vital vitallab
    label def vitallab 0 "Dead", modify
    label def vitallab 1 "Alive", modify

  • #2
    Originally posted by Girish Venkataraman View Post
    I am trying to compute median and range of overall survival in months after transformation for my data. When I use scale of 365.25, stci displays median and range, but when I change the scale to 12 and do the analysis, it gives nothing. What am I doing wrong? I would like the scale of years for the K-M plots but want to display median survival by months.

    My code:
    stset datelfu, failure(vital == 0) origin(time dotrans) exit(time dotrans + 365.25* 4) scale(365.25) // Final 4 year OS after transformation...thanks to Clyde pointing that it is origin and not enter
    stci, by(age65)

    vs

    stset datelfu, failure(vital == 0) origin(time dotrans) exit(time dotrans + 12 * 4) scale(12) // Final 4 year OS after transformation...thanks to Clyde pointing that it is origin and not enter
    stci, by(age65)

    Code:
    * Example generated by -dataex-. For more info, type help dataex
    clear
    input float age65 int(dotrans datelfu) byte vital
    0 20783 21381 0
    1 20423 22581 1
    1 20620 22586 1
    0 20529 21011 0
    1 20836 20860 0
    1 20977 21281 0
    1 20996 22530 1
    1 20831 21160 0
    1 21011 21197 0
    1 20915 21130 0
    0 19876 20691 0
    0 20620 20823 0
    1 19998 20761 0
    0 19757 20188 0
    0 20237 20258 0
    1 20173 20248 1
    0 19429 20194 0
    1 19927 22572 1
    1 20121 20383 0
    1 19956 20283 0
    1 20200 20382 1
    0 20230 20392 0
    1 20251 20389 0
    0 20370 22418 1
    1 19170 20466 0
    0 20180 20761 0
    0 19849 22575 1
    0 19586 22085 1
    0 19921 19960 1
    1 19670 19997 1
    1 19502 19567 0
    1 19600 19600 1
    0 19677 19835 0
    0 18992 19050 0
    1 19275 19320 1
    0 19302 22581 1
    1 18827 18830 1
    0 18956 18968 0
    0 18382 18695 0
    0 18016 18370 0
    1 18051 18066 0
    1 17904 18009 1
    1 17507 17752 0
    1 17722 17948 1
    1 17766 17825 0
    0 17729 17846 1
    1 17876 17876 1
    1 17157 17178 1
    1 17176 17226 0
    0 16919 17454 0
    0 17283 17425 0
    1 17372 19156 1
    0 16912 16918 0
    0 16663 17124 0
    1 16802 17162 0
    0 16713 16713 1
    0 16712 17631 1
    0 16439 16454 0
    1 16432 17173 1
    0 16301 16439 0
    1 16099 16190 0
    0 15937 16119 1
    1 15874 15882 0
    0 15767 16133 1
    0 15308 16415 1
    1 15628 15628 1
    0 15111 15701 0
    0 15606 15962 1
    0 15349 15361 0
    0 15200 15340 0
    1 14610 15349 0
    0 15013 15045 1
    0 14735 14940 0
    1 14676 14792 0
    1 21084 21262 0
    1 21172 21181 1
    1 21286 22078 0
    0 21049 21715 0
    1 21355 21633 0
    1 21538 21574 1
    1 21613 22677 1
    1 21620 22428 1
    1 21726 21868 0
    1 21964 21978 0
    1 21448 22571 1
    1 22102 22152 1
    0 22147 22580 1
    1 22179 22221 0
    1 22217 22587 1
    1 22302 22323 1
    1 22335 22476 0
    1 19709 21362 1
    1 20626 21591 0
    1 21097 22672 1
    1 20985 22300 1
    1 19358 19358 1
    0 22630 22700 1
    1 22679 22699 1
    1 21165 21179 1
    0 20851 22599 1
    end
    format %td dotrans
    format %td datelfu
    label values age65 age2
    label def age2 0 "<65 years", modify
    label def age2 1 ">=65 years", modify
    label values vital vitallab
    label def vitallab 0 "Dead", modify
    label def vitallab 1 "Alive", modify
    My best guess is I should do the stci before setting these exit time options. That seems to be the only logical explanation. The code worked once I got rid of those exit times. Hope I am right?

    Comment

    Working...
    X