Announcement

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

  • listing the transition probability value at 5 years using msset and stmerlin - code from m,crowther

    Hello I am trying to obtain the transition probability (the acutal number) of going from alive to recurrence _trans1==1
    I'm sure it's something simple, (see bold section - however this seems to be giving me errors


    I have used the following code - credit to prof m crowther - thank you !

    Code:
    clear all
    use http://fmwww.bc.edu/repec/bocode/m/multistate_example,clear
    
    ///rfi = relapse indication
    //osi overall survvior alive or fead, times rf - relapse free, os - overall srufvial 
    msset, id(pid) states(rfi osi) times(rf os) covariates(age)
    
    //Stores matrix callted tmat name, stores the values from transmatrix 
    mat tmat = r(transmatrix)
    
    //Displays tmat ie the values of transmatrix 
    mat list tmat
    
    //Declare survival data
    stset _stop, enter(_start) failure(_status=1) scale(12)
    
    stmerlin if _trans1==1, distribution(weibull)
    estimate store m1
    
    stmerlin if _trans2==1, distribution(weibull)
    estimate store m2
    
    stmerlin if _trans3==1, distribution(weibull)
    estimate store m3
    
    
    //This calculates a transition probability as an average for all the patients in the study for those with hormone treatment == 1
    predictms, transmatrix(tmat) models(m1 m2 m3) probability standif(hormon==1)
    graphms
    
    
    ///Question However I WOUld like to actual value, of course i can read it off the graph - graphms-. However i would like an accurate value I have tried the following
    
    
    list _trans==1 if _time ==5 
    list _trans=1 if _time ==5 
    
    ///Both return errors, do you have an idea how to get the actual value
    Of course I would repeat this for the
    _trans1 (alive to recurrence). ///already done
    _trans2 (alive to dead)
    _trans3 (recurrence to dead)



    Question 2: However I don't seem to have the transition probability for those that remain in the alive state? Any ideas how to execute this?
Working...
X