<?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: Simulating log-logistc or log-normal survival data. in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482893#M25087</link>
    <description>&lt;P&gt;/* Weibull and Exponential */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%Let Lambda = 1000 ;&lt;BR /&gt;%Let Shape = 1 ; /* value of 1 for exponential */&lt;BR /&gt;%Let Time_Censor = 99999999999999;&lt;BR /&gt;%Let Beta0 = 1;&lt;BR /&gt;%Let Beta1 = 1.2;&lt;BR /&gt;%Let Sn=10;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data Sim1A&lt;BR /&gt;( Drop = Linear_Predict Time_Censor Beta1 Lambda Shape Beta0);&lt;BR /&gt;Lambda = &amp;amp;Lambda. ;&lt;BR /&gt;Shape = &amp;amp;Shape.;&lt;BR /&gt;n= 10;&lt;BR /&gt;Time_Censor = &amp;amp;Time_Censor.;&lt;BR /&gt;Do Sim = 1 To &amp;amp;Sn. ;&lt;BR /&gt;Do n = 1 To n ;&lt;BR /&gt;ID + 1 ;&lt;BR /&gt;x1=rand('BERN',.5);&lt;BR /&gt;Beta0=&amp;amp;Beta0.;&lt;BR /&gt;Beta1=&amp;amp;Beta1.;&lt;BR /&gt;Linear_Predict = Exp(-(beta0* + (Beta1 * x1))) ;&lt;BR /&gt;Time = Rand( "WEIBULL", Shape ,Lambda* Linear_Predict) ;&lt;BR /&gt;If Time_Censor &amp;lt; Time&lt;BR /&gt;Then&lt;BR /&gt;Do ;&lt;BR /&gt;Censored = 1 ;&lt;BR /&gt;Time = Time_Censor ;&lt;BR /&gt;End ;&lt;BR /&gt;Else Censored = 0 ;&lt;BR /&gt;Output ;&lt;BR /&gt;End ;&lt;BR /&gt;End ;&lt;BR /&gt;Run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 31 Jul 2018 17:48:21 GMT</pubDate>
    <dc:creator>Joepants</dc:creator>
    <dc:date>2018-07-31T17:48:21Z</dc:date>
    <item>
      <title>Simulating log-logistc or log-normal survival data.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482826#M25085</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently try to simulate some log-normal and log-logistic distributed survival times in SAS. I have done it for Weibull and Exponential and have attempted to get a log normal however comes up with errors. If anyone could offer me any insight I would greatly appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Joey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 13:57:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482826#M25085</guid>
      <dc:creator>Joepants</dc:creator>
      <dc:date>2018-07-31T13:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating log-logistc or log-normal survival data.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482875#M25086</link>
      <description>&lt;P&gt;How have you done it for&amp;nbsp;&lt;SPAN&gt;Weibull and Exponential? And how have you done it with log normal?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Show us your code and your log?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482875#M25086</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-07-31T17:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating log-logistc or log-normal survival data.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482893#M25087</link>
      <description>&lt;P&gt;/* Weibull and Exponential */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%Let Lambda = 1000 ;&lt;BR /&gt;%Let Shape = 1 ; /* value of 1 for exponential */&lt;BR /&gt;%Let Time_Censor = 99999999999999;&lt;BR /&gt;%Let Beta0 = 1;&lt;BR /&gt;%Let Beta1 = 1.2;&lt;BR /&gt;%Let Sn=10;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data Sim1A&lt;BR /&gt;( Drop = Linear_Predict Time_Censor Beta1 Lambda Shape Beta0);&lt;BR /&gt;Lambda = &amp;amp;Lambda. ;&lt;BR /&gt;Shape = &amp;amp;Shape.;&lt;BR /&gt;n= 10;&lt;BR /&gt;Time_Censor = &amp;amp;Time_Censor.;&lt;BR /&gt;Do Sim = 1 To &amp;amp;Sn. ;&lt;BR /&gt;Do n = 1 To n ;&lt;BR /&gt;ID + 1 ;&lt;BR /&gt;x1=rand('BERN',.5);&lt;BR /&gt;Beta0=&amp;amp;Beta0.;&lt;BR /&gt;Beta1=&amp;amp;Beta1.;&lt;BR /&gt;Linear_Predict = Exp(-(beta0* + (Beta1 * x1))) ;&lt;BR /&gt;Time = Rand( "WEIBULL", Shape ,Lambda* Linear_Predict) ;&lt;BR /&gt;If Time_Censor &amp;lt; Time&lt;BR /&gt;Then&lt;BR /&gt;Do ;&lt;BR /&gt;Censored = 1 ;&lt;BR /&gt;Time = Time_Censor ;&lt;BR /&gt;End ;&lt;BR /&gt;Else Censored = 0 ;&lt;BR /&gt;Output ;&lt;BR /&gt;End ;&lt;BR /&gt;End ;&lt;BR /&gt;Run ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:48:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482893#M25087</guid>
      <dc:creator>Joepants</dc:creator>
      <dc:date>2018-07-31T17:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating log-logistc or log-normal survival data.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482961#M25091</link>
      <description>&lt;P&gt;And the code for your attempt at lognormal or log-log?&lt;/P&gt;
&lt;P&gt;If you get errors copy the code and error messages from the log and paste into a code box opened with the forums {i} icon to preserve formatting of any error diagnostics that appear. It is a good idea to paste code in either the code box or the box opened with the "running man"&amp;nbsp; to preserve formatting as the message windows will remove a lot of white space.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 22:43:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/482961#M25091</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-07-31T22:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating log-logistc or log-normal survival data.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/483040#M25092</link>
      <description>&lt;P&gt;I have fixed it now thank you, see below, I think I have done it correctly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Sim3&lt;/P&gt;&lt;P&gt;&amp;nbsp;( Drop = Linear_Predict Beta1 Lambda Shape Beta0 Beta1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; Time_Censor = 999999999999999999;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Lambda = 1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Shape = 2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Do Sim = 1 To 1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Do n = 1 To 10000 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ID + 1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;x1=rand('BERN',.5);&lt;/P&gt;&lt;P&gt;r=RAND("uniform");&lt;/P&gt;&lt;P&gt;Beta0 = 1;&lt;/P&gt;&lt;P&gt;Beta1 = 2;&lt;/P&gt;&lt;P&gt;Linear_Predict = Exp(-(beta0* + (Beta1 * x1))) ;&lt;/P&gt;&lt;P&gt;Time=(((1/r)-1)**(1/Shape))*(Linear_Predict);&lt;/P&gt;&lt;P&gt;If Time_Censor &amp;lt; Time&lt;/P&gt;&lt;P&gt;&amp;nbsp;Then&lt;/P&gt;&lt;P&gt;&amp;nbsp;Do ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Censored = 1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Time = Time_Censor ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;End ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Else Censored = 0 ;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;End ;&lt;/P&gt;&lt;P&gt;End ;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 11:09:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/483040#M25092</guid>
      <dc:creator>Joepants</dc:creator>
      <dc:date>2018-08-01T11:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Simulating log-logistc or log-normal survival data.</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/483078#M25094</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/218061"&gt;@Joepants&lt;/a&gt;:&lt;/P&gt;
&lt;P&gt;Why do you write&lt;/P&gt;
&lt;PRE&gt;-(beta0* + (Beta1 * x1)) &lt;FONT face="arial,helvetica,sans-serif"&gt;?&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;This is equivalent to&lt;/P&gt;
&lt;PRE&gt;-(beta0 * Beta1 * x1)&lt;/PRE&gt;
&lt;P&gt;i.e., a model with intercept 0, unlike the more plausible&lt;/P&gt;
&lt;PRE&gt;-(beta0 + Beta1 * x1)&lt;/PRE&gt;
&lt;P&gt;Also, it would seem more familiar to me to omit the minus sign, so that the estimates of beta0 and beta1 are the "Intercept" and "x1" parameters in the output of a generic analysis like&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc lifereg data=sim3;
model time*censored(1)=x1 / dist=llogistic;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But, of course, this is only a&amp;nbsp;matter of parameterization.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When I perform simulations I always specify an initial seed value using the &lt;A href="http://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0gw58qo85qp56n1kbpiz50ww8lv.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;CALL STREAMINIT routine&lt;/A&gt; in order to get&amp;nbsp;reproducible results.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Aug 2018 14:16:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Simulating-log-logistc-or-log-normal-survival-data/m-p/483078#M25094</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2018-08-01T14:16:20Z</dc:date>
    </item>
  </channel>
</rss>

