<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Transition probability using weibull in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952123#M42798</link>
    <description>&lt;P&gt;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&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2023/10/09/functions-continuous-distributions.html" target="_blank"&gt;Functions for continuous probability distributions in SAS - The DO Loop&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 28 Nov 2024 11:16:05 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2024-11-28T11:16:05Z</dc:date>
    <item>
      <title>Transition probability using weibull</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952088#M42796</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;/* Weibull parameters for PFS and OS */&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;shape_pfs = &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;0.77&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;/* Example shape for PFS */&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;scale_pfs = &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;0.31&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;/* Example scale for PFS */&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;shape_os = &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;1.56&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;/* Example shape for OS */&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;scale_os = &lt;/SPAN&gt;&lt;SPAN&gt;&lt;STRONG&gt;0.19&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;/* Example scale for OS */&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;Can someone help with the code.&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Jerusha&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2024 19:03:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952088#M42796</guid>
      <dc:creator>stellapersis7</dc:creator>
      <dc:date>2024-11-27T19:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Transition probability using weibull</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952117#M42797</link>
      <description>Calling &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;</description>
      <pubDate>Thu, 28 Nov 2024 01:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952117#M42797</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-11-28T01:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: Transition probability using weibull</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952123#M42798</link>
      <description>&lt;P&gt;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&amp;nbsp;&lt;A href="https://blogs.sas.com/content/iml/2023/10/09/functions-continuous-distributions.html" target="_blank"&gt;Functions for continuous probability distributions in SAS - The DO Loop&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;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;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Nov 2024 11:16:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Transition-probability-using-weibull/m-p/952123#M42798</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-11-28T11:16:05Z</dc:date>
    </item>
  </channel>
</rss>

