<?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: Odds Ratio from PROC CAUSALTRT in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728525#M35331</link>
    <description>Thank you!!</description>
    <pubDate>Tue, 23 Mar 2021 18:52:53 GMT</pubDate>
    <dc:creator>tka726</dc:creator>
    <dc:date>2021-03-23T18:52:53Z</dc:date>
    <item>
      <title>Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728487#M35317</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I am completely new to PROC CAUSALTRT, and I am attempting to use this procedure for inverse weighting by the propensity score (IPTW) – comparing 2 treatment groups (coded 0, 1) on outcomes (coded as 0, 1). I am using ATE weights. I would like an odds ratio to compare groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;causaltrt&lt;/STRONG&gt; data = ips descending METHOD=IPWR PPSMODEL;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class outcome_ev&amp;nbsp; trtgrp female&amp;nbsp; diabyn hxsmokeyn ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; psmodel trtgrp (REF="0") = age bmi female&amp;nbsp; diabyn hxsmokeyn ;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model outcome_ev = /&amp;nbsp; DIST=BIN;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output out=causaltrt_ate PREDCNT=PREDCNT PREDTRT=PREDTRT&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ps=ps ipw=ipw;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ods output CausalEffects=CausalEffects;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want an odds ratio; is it correct to take the exponent of the ATE estimate to get the odds ratio to compare treatments on the outcome?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; causal;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set&amp;nbsp; CausalEffects;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; OR_= PUT(exp(estimate),&lt;STRONG&gt;20.5&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; OR_LOW= PUT(exp(lowerwaldcl),&lt;STRONG&gt;20.5&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; OR_UP= PUT(exp(upperwaldcl),&lt;STRONG&gt;20.5&lt;/STRONG&gt;);&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the result I got: OR of 1.00046 ( 0.99980, 1.00113), pvalue of 0.174.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to see - &amp;nbsp;I also used GENMOD, and the result was very different:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if trtgrp = &lt;STRONG&gt;0&lt;/STRONG&gt; then weight1 = &lt;STRONG&gt;1&lt;/STRONG&gt;/(&lt;STRONG&gt;1&lt;/STRONG&gt;-propensity);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if trtgrp = &lt;STRONG&gt;1&lt;/STRONG&gt; then weight1 = &lt;STRONG&gt;1&lt;/STRONG&gt;/(propensity);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt; &lt;STRONG&gt;genmod&lt;/STRONG&gt; data= ips descending;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; weight weight1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; class outcome_ev / param=ref;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; model outcome_ev = trtgrp alpha = &lt;STRONG&gt;0.05&lt;/STRONG&gt; dist=bin;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; estimate "trtgrp" trtgrp &lt;STRONG&gt;1&lt;/STRONG&gt; / exp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result from GENMOD: OR of 3.6999 ( 1.6562, 8.2656) pvalue of 0.001.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The results are so very different, I wasn’t sure that I was using PROC CAUSALTRT correctly. HELP!&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 16:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728487#M35317</guid>
      <dc:creator>tka726</dc:creator>
      <dc:date>2021-03-23T16:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728495#M35320</link>
      <description>&lt;P&gt;Typically, the difference is the most meaningful comparison of the treatments. You can compare that to the difference obtained using GENMOD by following it with the &lt;A href="http://support.sas.com/kb/62362" target="_self"&gt;NLMeans macro&lt;/A&gt; to estimate the difference and its standard error and confidence interval on the mean (probability) scale. The following shows this using the example in the Getting Started section of the CAUSALTRT documentation. Note that the inverse proportional weights, as computed by the IPW= option in the OUTPUT statement, are used in GENMOD. The results are essentially the same, but CAUSALTRT uses a robust variance estimator, so the standard errors are a bit bigger as would be expected.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc causaltrt data=drugs method=ipwr ppsmodel;
   class Gender;
   psmodel Drug(ref='Drug_A') = Age Gender BMI;
   model Diabetes2(ref='No') / dist = bin;
   output out=out ps=ps ipw=ipw;
   ods output CausalEffects=ce;
run;
proc genmod data=out;
   weight ipw;
   class Drug(ref='Drug_A'); 
   model Diabetes2(ref='No') = drug / dist=bin;
   lsmeans drug / e ilink plots=none;
   store fit;
   ods output coef=Coeffs;
run;
%NLMeans(instore=fit, coef=Coeffs, link=logit)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Mar 2021 17:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728495#M35320</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-03-23T17:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728515#M35326</link>
      <description>&lt;P&gt;The ATE estimate reported by PROC CAUSALTRT is measured on the risk difference scale, that is the potential outcome mean for the treatment condition (POM1) minus the potential outcome mean for the control condition (POM0). Exponentiating this estimate will not give the the effect estimate on the odds ratio scale.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Instead what you can do is use the potential outcome mean estimates that are reported to compute the odds ratio, i.e. (POM1*(1-POM0) )/ (POM0 * (1-POM1) ). To compute confidence limits for this estimate you could apply the delta method. The Analysis of Causal Effects table reports estimates for the standard deviation of POM1 and POM2 and you can obtain the estimate for their covariance by using the identity VAR(ATE)=VAR(POM1 - POM0 ) = VAR(POM1) + VAR(POM0)- 2*COVAR(POM1, POM2).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Mar 2021 18:17:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728515#M35326</guid>
      <dc:creator>MichaelL_SAS</dc:creator>
      <dc:date>2021-03-23T18:17:02Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728521#M35329</link>
      <description>&lt;P&gt;Following up on MIchael's comment, if you particularly want to estimate the odds ratio (or relative risk) you can use code like the following after the CAUSALTRT step I showed earlier.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
   select stderr**2 as var format=15.12
   into :var1 - :var3
   from ce;
   quit;
data cov;
   keep col:;
   cov=(&amp;amp;var1+&amp;amp;var2-&amp;amp;var3)/2;
   col1=&amp;amp;var1; col2=cov; output;
   col1=cov; col2=&amp;amp;var2; output;
   run;
data ests; 
   set ce;
   where parameter="POM";
   run;
%nlest(inest=ests, incovb=cov, f=b_p1-b_p2, label=Difference of POMs)
%nlest(inest=ests, incovb=cov, f=b_p1/b_p2, label=Rel Risk of POMs)
%nlest(inest=ests, incovb=cov, f=(b_p1/(1-b_p1))/(b_p2/(1-b_p2)), label=Odds Ratio of POMs)

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 23 Mar 2021 18:40:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728521#M35329</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-03-23T18:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728524#M35330</link>
      <description>Thanks so much! Perfect!</description>
      <pubDate>Tue, 23 Mar 2021 18:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728524#M35330</guid>
      <dc:creator>tka726</dc:creator>
      <dc:date>2021-03-23T18:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728525#M35331</link>
      <description>Thank you!!</description>
      <pubDate>Tue, 23 Mar 2021 18:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728525#M35331</guid>
      <dc:creator>tka726</dc:creator>
      <dc:date>2021-03-23T18:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728586#M35334</link>
      <description>Quick follow up question - will PROC CAUSALTRT calculate results if one group has 0 events?</description>
      <pubDate>Tue, 23 Mar 2021 22:13:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728586#M35334</guid>
      <dc:creator>tka726</dc:creator>
      <dc:date>2021-03-23T22:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Odds Ratio from PROC CAUSALTRT</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728605#M35335</link>
      <description>&lt;P&gt;PROC CAUSALTRT requires subjects in both the treatment and control condition and will return an error either group has no subjects.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 00:11:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Odds-Ratio-from-PROC-CAUSALTRT/m-p/728605#M35335</guid>
      <dc:creator>MichaelL_SAS</dc:creator>
      <dc:date>2021-03-24T00:11:03Z</dc:date>
    </item>
  </channel>
</rss>

