BookmarkSubscribeRSS Feed
stellapersis7
Obsidian | Level 7

Hi all,

I am trying to get transition probability for a cost effectiveness analysis (markov model in treeage) using weibull distribution. I got the shape and scale for PFS and OS for a duration of 30 months. I want to extrapolate it to 10 years and get the transition probabilities for progression free survival to progressed disease, progression free survival to death and progressed disease to death. 

 /* Weibull parameters for PFS and OS */

   shape_pfs = 0.77;  /* Example shape for PFS */

   scale_pfs = 0.31;   /* Example scale for PFS */

   shape_os = 1.56;     /* Example shape for OS */

   scale_os = 0.19;    /* Example scale for OS */

As far as I understood from literature, we need the above 4 values only to calculate the transition probabilities. So i am not attaching the PFS and OS survival curves etc.

Can someone help with the code.

Thank you,

Jerusha

2 REPLIES 2
Rick_SAS
SAS Super FREQ

I am not familiar with terms like PFS and OS, so I do not understand the question. However, it sounds like you want to use the CDF("Weibull") function to compute probabilities and maybe the difference between probabilities. The CDF gives the probability less than some value. If you want the probability greater than some value, use the SDF function, where SDF9x) = 1 - CDF(x). See Functions for continuous probability distributions in SAS - The DO Loop

 

You need to use a consistent scale to estimate the parameter and probabilities. You gave example parameters, but I do not know if those correspond to units of years, months, weeks, or days. When you estimate the probabilities, make sure you use the same scale for the length of time. In the following program, I used 10 (for years), but you might need to use 12*10 if the data are in months. 

 

I doubt whether the following is actually what you need, but perhaps it will point you in the correct direction, or someone else who understands your question better might be able to modify the program. Best wishes.

 

data Transition_Probabilities;
    /* Weibull parameters for PFS and OS */
    shape_pfs = 0.77;  /* shape for PFS */
    scale_pfs = 0.31;  /* scale for PFS */
    shape_os = 1.56;   /* shape for OS */
    scale_os = 0.19;   /* scale for OS */
    length = 10;       /* 10 years */

    /* Calculate survival probabilities using the Weibull survival function.
       The SDF is 1 - CDF.
       I AM NOT SURE WHAT DEFINITIONS TO USE! */

    /* calculate transition probabilities */
    /* PFS to Progressed Disease */
    trans_prob_pfs_prog = sdf("weibull", length, shape_pfs, scale_pfs);
    /* Progressed Disease to Death */
    trans_prob_prog_deats = sdf("weibul", length, shape_os, scale_os);
    /* PFS to Death */
    trans_prob_pfs_death = cdf("weibull", length, shape_pfs, scale_pfs) -
                            cdf("weibul", length, shape_os, scale_os);
run;

proc print data=Transition_Probabilities;
run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 261 views
  • 0 likes
  • 3 in conversation