<?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 Calculating bootstrap confidence intervals for percent attenuation in hazard ratio after adjustment in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918219#M45565</link>
    <description>&lt;P&gt;I need to calculate the confidence intervals for the percent attenuation in a hazard ratio when comparing an unadjusted and adjusted model. The confidence intervals need to be calculated using bootstrap methods.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first cox regression model includes mortality as the outcome and education (in 5 categories) as the predictor (crude model). The highest education is used as the reference category. Let's say in the adjusted model that I add the variable "job control". I then calculate the attenuation in the hazard ratio for each category of education using this formula&lt;/P&gt;&lt;P&gt;((Crude HR-Adjusted HR)/(Adjusted HR -1))*100&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the beta coefficient instead it looks like this (crude beta-adjusted beta)/crude beta)*100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to calculate the confidence interval around this percent attenuation but I can't figure out how to do this. I have found the procedure described for STATA but I cannot find an equivalent description using SAS. Happy for any advice!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2024 14:01:28 GMT</pubDate>
    <dc:creator>Malmroth</dc:creator>
    <dc:date>2024-02-28T14:01:28Z</dc:date>
    <item>
      <title>Calculating bootstrap confidence intervals for percent attenuation in hazard ratio after adjustment</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918219#M45565</link>
      <description>&lt;P&gt;I need to calculate the confidence intervals for the percent attenuation in a hazard ratio when comparing an unadjusted and adjusted model. The confidence intervals need to be calculated using bootstrap methods.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first cox regression model includes mortality as the outcome and education (in 5 categories) as the predictor (crude model). The highest education is used as the reference category. Let's say in the adjusted model that I add the variable "job control". I then calculate the attenuation in the hazard ratio for each category of education using this formula&lt;/P&gt;&lt;P&gt;((Crude HR-Adjusted HR)/(Adjusted HR -1))*100&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use the beta coefficient instead it looks like this (crude beta-adjusted beta)/crude beta)*100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to calculate the confidence interval around this percent attenuation but I can't figure out how to do this. I have found the procedure described for STATA but I cannot find an equivalent description using SAS. Happy for any advice!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 14:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918219#M45565</guid>
      <dc:creator>Malmroth</dc:creator>
      <dc:date>2024-02-28T14:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating bootstrap confidence intervals for percent attenuation in hazard ratio after adjustm</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918325#M45570</link>
      <description>&lt;P&gt;Do you know how to estimate the parameter on one data set by using PROC PHREG?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, start there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, read &lt;A href="https://blogs.sas.com/content/iml/2018/12/12/essential-guide-bootstrapping-sas.html" target="_self"&gt;The Essential Guide to Boostrapping in SAS&lt;/A&gt;&amp;nbsp;for techniques and examples that enable you to bootstrap any statistic from any SAS procedure. In general, the main steps are&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;generate the bootstrap samples. You can often use PROC SURVEYSELECT to generate the samples&lt;/LI&gt;
&lt;LI&gt;analyze each sample by adding a BY statement to the procedure code that you used to obtain the original estimate. This generates the boostrap distribution of estimates&lt;/LI&gt;
&lt;LI&gt;Estimate the CI from the bootstrap distribution. There are multiple ways to compute the bootstrap CI, but the percentile CI is the simplest.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 28 Feb 2024 20:42:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918325#M45570</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-02-28T20:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating bootstrap confidence intervals for percent attenuation in hazard ratio after adjustm</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918376#M45579</link>
      <description>&lt;P&gt;Thanks for you reply!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Allow me to clarify a little bit. The issue is that I am looking for the confidence interval for the &lt;EM&gt;percent&amp;nbsp;difference&lt;/EM&gt; in hazard ratio. I calculate this in the main sample by first running the crude model using proc phreg and saving the output, then running the adjusted model and saving the output. Then I merge the saved output from both models and calculate the difference using the formula which I posted above. Since this requires multiple steps, I have not figured out how to calculate the bootstrap confidence intervals for this difference in hazard ratio. The examples that I find in SAS are based on a statistic that SAS can directly return in one proc step, which I don't think is possible in my case. In the Stata example that I linked to above, there is a command that seems to repeat the whole process (crude model, adjusted model, HR difference) using bootstrap sampling, but I have not found a way to do this in SAS.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 08:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918376#M45579</guid>
      <dc:creator>Malmroth</dc:creator>
      <dc:date>2024-02-29T08:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating bootstrap confidence intervals for percent attenuation in hazard ratio after adjustm</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918379#M45580</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/464122"&gt;@Malmroth&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/464122"&gt;@Malmroth&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I calculate this in the main sample by first running the crude model using proc phreg and saving the output, then running the adjusted model and saving the output. Then I merge the saved output from both models and calculate the difference using the formula which I posted above. Since this requires multiple steps, I have not figured out how to calculate the bootstrap confidence intervals for this difference in hazard ratio.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think you can still perform the steps described by Rick (and in the Cassell [2010] reference linked in his blog). Both the PROC PHREG step "running the crude model" and the step "running the adjusted model" would use a BY statement (&lt;FONT face="courier new,courier"&gt;by Replicate&lt;/FONT&gt;). The saved outputs from these steps contain the BY variable (&lt;FONT face="courier new,courier"&gt;Replicate&lt;/FONT&gt;), so merging "the saved output from both models" should be straightforward. A single DATA step should then suffice to "calculate the difference" using your formula. Percentiles of these differences (one per replicate) form the lower and upper bounds of a bootstrap confidence interval.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 10:13:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918379#M45580</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2024-02-29T10:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating bootstrap confidence intervals for percent attenuation in hazard ratio after adjustm</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918382#M45581</link>
      <description>&lt;P&gt;It doesn't matter how many procedures are needed to compute the statistic for each bootstrap sample. The concept is the same. Instead of running one PROC with a BY statement, you might need to run multiple procedures, DATA steps, PROC IML programs, etc, to get the bootstrap distribution of statistics. The important thing is that you (efficiently) run the same analysis on each bootstrap sample that you ran to get the original statistic.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 10:47:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculating-bootstrap-confidence-intervals-for-percent/m-p/918382#M45581</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2024-02-29T10:47:44Z</dc:date>
    </item>
  </channel>
</rss>

