<?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: Estimate hazard ratio for the treatment at specific values for age by using splines in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/618054#M29757</link>
    <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I understood "param=glm" option and correct SAS code as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=DATA1;&lt;BR /&gt;effect SPL = spline(AGE/ degree=2 basis=tpf(noint) details knotmethod=rangefractions(0.25 0.50 0.75) );&lt;BR /&gt;class STATIN/param=glm;&lt;BR /&gt;model MACE_TIME * MACE(0)=SPL STATIN STATIN*SPL&lt;BR /&gt;/rl=wald ties=EFRON;&lt;BR /&gt;store splineout;&lt;/P&gt;&lt;P&gt;lsmeans STATIN "50" /at AGE=50 adjust=tukey cl exp;&lt;/P&gt;&lt;P&gt;lsmestimate STATIN "50" 1 -1 / at AGE=50 e cl exp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this "lsmeans" estimate calculate hazard ratio for statin use vs. non statin use at age of 50?&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;The result obtained from this program was attached (lsmeans_result.tif)&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2020 11:58:22 GMT</pubDate>
    <dc:creator>Nobuyuki</dc:creator>
    <dc:date>2020-01-17T11:58:22Z</dc:date>
    <item>
      <title>Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616438#M29709</link>
      <description>&lt;P&gt;I would like to show that the treatment effect vary depending on age, and the relationship is nonlinear.&lt;/P&gt;&lt;P&gt;To do so, I would like to conduct statistical analysis and plot which are described in attached article entitled "Statins for primary prevention of cardiovascular events and&amp;nbsp;mortality in old and very old adults with and without type2 diabetes: retrospective cohort study".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this study, statin is useful in younger patients with diabetes mellitus, but not in elderly patients.&lt;/P&gt;&lt;P&gt;In Figure 2, x-axis represents age and y-axis represents the hazard ratio for statin use.&lt;/P&gt;&lt;P&gt;I tried to create the SAS code for this, but it did not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;********************************************SAS code***********************************************************&lt;/P&gt;&lt;P&gt;proc phreg data=DATA1;&lt;BR /&gt;effect SPL = spline(AGE/ degree=2 basis=tpf(noint) details knotmethod=rangefractions(0.25 0.50 0.75) );&lt;BR /&gt;class STATIN/param=ref;&lt;BR /&gt;model MACE_TIME * MACE(0)=SPL AGE AGE*SPL&lt;BR /&gt;/rl=wald ties=EFRON;&lt;BR /&gt;store splineout;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro est(ref,start,end,by);&lt;BR /&gt;%Do i = 1 %To %eval(%SysFunc( Ceil( %SysEvalF( ( &amp;amp;End - &amp;amp;Start ) / &amp;amp;By ) ) ) +1) ;&lt;BR /&gt;%Let value=%SysEvalF( ( &amp;amp;Start - &amp;amp;By ) + ( &amp;amp;By * &amp;amp;I ) ) ;&lt;BR /&gt;estimate "&amp;amp;value." SPL &amp;amp;value STATIN [1,1] [-1,0]/ exp cl;&lt;BR /&gt;%end;&lt;BR /&gt;%mend est;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods dataset Estimates=Estimates;&lt;BR /&gt;proc plm restore=splineout;&lt;BR /&gt;%est(ref=35, start=35, end=100, by=5);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data estimates;&lt;BR /&gt;set estimates;&lt;BR /&gt;AGE=label*1;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sgplot data=estimates ;&lt;BR /&gt;title "Effect of age" ;&lt;BR /&gt;Series y=ExpEstimate x=AGE /LINEATTRS=(THICKNESS=3 color=black) ;&lt;BR /&gt;Series y=LowerExp x=AGE / LINEATTRS=(pattern=ShortDash color=Black THICKNESS=1);&lt;BR /&gt;Series y=UpperExp x=AGE / LINEATTRS=(pattern=ShortDash color=Black THICKNESS=1);&lt;BR /&gt;REFLINE 1 / axis=y;&lt;BR /&gt;yaxis Values=(0 to 5 by 1) Label="Hazard Ratio";&lt;BR /&gt;xaxis min=11 VALUES=(35 to 100 by 5) Label="Age" ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;********************************************SAS code***********************************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a way to get an estimate for the hazard ratio for treatment at specific values for age.&lt;/P&gt;&lt;P&gt;"&lt;A href="https://communities.sas.com/t5/Statistical-Procedures/Estimate-interaction-effect-with-splines/td-p/179802" target="_blank"&gt;https://communities.sas.com/t5/Statistical-Procedures/Estimate-interaction-effect-with-splines/td-p/179802&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;Sophie post a similar question, and Steve recommended to use "lsmestimate".&lt;/P&gt;&lt;P&gt;However, lsmestimate statement cannot be used in PHREG procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is appreciated if you could tell me how to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enzan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 12:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616438#M29709</guid>
      <dc:creator>Nobuyuki</dc:creator>
      <dc:date>2020-01-10T12:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616448#M29710</link>
      <description>&lt;P&gt;I'm not sure maybe this is a feature of a newer SAS/STAT Version then you have - but SAS/STAT 15.1 supports it just fine:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_phreg_syntax.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=15.1&amp;amp;docsetTarget=statug_phreg_syntax.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 13:16:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616448#M29710</guid>
      <dc:creator>Criptic</dc:creator>
      <dc:date>2020-01-10T13:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616463#M29712</link>
      <description>&lt;P&gt;Dear Criptic&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sorry, I did not clarify the problem.&lt;/P&gt;&lt;P&gt;Proc PHREG procedure which I described above work well.&lt;/P&gt;&lt;P&gt;However, I don't know how to estimate the hazard ratio for treatment use at the specific values for age&lt;/P&gt;&lt;P&gt;because I'm not familiar with "estimate" statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Enzan&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 13:44:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616463#M29712</guid>
      <dc:creator>Nobuyuki</dc:creator>
      <dc:date>2020-01-10T13:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616522#M29715</link>
      <description>&lt;P&gt;Your model looks rather odd - you define STATIN as a CLASS variable but don't use it in the model. And you define a spline on AGE but then use both AGE and its spline in the model. Assuming that STATIN is your treatment variable, I assume what you want in your model is STATIN SPL*STATIN.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can then use the LSMEANS statement with the AT option to do what you are looking for. See the example in &lt;A href="http://support.sas.com/kb/57975" target="_self"&gt;this note&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jan 2020 16:04:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616522#M29715</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-01-10T16:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616648#M29718</link>
      <description>&lt;P&gt;I'm sorry, that is wrong code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the corrected SAS code.&lt;/P&gt;&lt;P&gt;Also I added lsmeans statement as you recommended.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**********************************************SAS code***********************************************************&lt;/P&gt;&lt;P&gt;proc phreg data=DATA1;&lt;BR /&gt;effect SPL = spline(AGE/ degree=2 basis=tpf(noint) details knotmethod=rangefractions(0.25 0.50 0.75) );&lt;BR /&gt;class STATIN/param=ref;&lt;BR /&gt;model MACE_TIME * MACE(0)=SPL STATIN STATIN*SPL&lt;BR /&gt;/rl=wald ties=EFRON;&lt;BR /&gt;store splineout;&lt;/P&gt;&lt;P&gt;lsmeans STATIN / at SPL=50;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;**********************************************SAS code***********************************************************&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, after running this SAS code, caution said&lt;/P&gt;&lt;P&gt;"The model does not have a GLM parameterization. This parameterization is required for the TEST, LSMEANS, LSMESTIMATE, and&lt;BR /&gt;SLICE statement. These statements are ignored."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS university edition(SAS/STAT version is 15.1).&lt;/P&gt;&lt;P&gt;According to this paper " &lt;A href="https://www.pharmasug.org/proceedings/2011/SAS/PharmaSUG-2011-SAS-SP01.pdf" target="_blank"&gt;https://www.pharmasug.org/proceedings/2011/SAS/PharmaSUG-2011-SAS-SP01.pdf&lt;/A&gt; ",&lt;/P&gt;&lt;P&gt;"LSMEANS" statement supports the "PHREG" procedure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please tell me how to deal with this?&lt;/P&gt;</description>
      <pubDate>Sat, 11 Jan 2020 00:14:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616648#M29718</guid>
      <dc:creator>Nobuyuki</dc:creator>
      <dc:date>2020-01-11T00:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616912#M29726</link>
      <description>&lt;P&gt;Just add the PARAM=GLM option following a slash (/) at the end of the CLASS statement so that GLM parameterization is used.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jan 2020 14:03:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/616912#M29726</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2020-01-13T14:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/618054#M29757</link>
      <description>&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;I understood "param=glm" option and correct SAS code as below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc phreg data=DATA1;&lt;BR /&gt;effect SPL = spline(AGE/ degree=2 basis=tpf(noint) details knotmethod=rangefractions(0.25 0.50 0.75) );&lt;BR /&gt;class STATIN/param=glm;&lt;BR /&gt;model MACE_TIME * MACE(0)=SPL STATIN STATIN*SPL&lt;BR /&gt;/rl=wald ties=EFRON;&lt;BR /&gt;store splineout;&lt;/P&gt;&lt;P&gt;lsmeans STATIN "50" /at AGE=50 adjust=tukey cl exp;&lt;/P&gt;&lt;P&gt;lsmestimate STATIN "50" 1 -1 / at AGE=50 e cl exp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this "lsmeans" estimate calculate hazard ratio for statin use vs. non statin use at age of 50?&lt;/P&gt;&lt;P&gt;Is this correct?&lt;/P&gt;&lt;P&gt;The result obtained from this program was attached (lsmeans_result.tif)&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 11:58:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/618054#M29757</guid>
      <dc:creator>Nobuyuki</dc:creator>
      <dc:date>2020-01-17T11:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Estimate hazard ratio for the treatment at specific values for age by using splines</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/618059#M29758</link>
      <description>&lt;P&gt;Also I used "lsmestimate".&lt;/P&gt;&lt;P&gt;The results I obtained from this statement was also attached (lsmestimate_result).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that something was wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is my SAS program correct code?&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 12:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Estimate-hazard-ratio-for-the-treatment-at-specific-values-for/m-p/618059#M29758</guid>
      <dc:creator>Nobuyuki</dc:creator>
      <dc:date>2020-01-17T12:08:43Z</dc:date>
    </item>
  </channel>
</rss>

