<?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 How to set cod to run power analysis for binary outcomes in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944028#M47142</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I may not have good understanding of power analysis so far. But I'm trying to run a power analysis to see what sample size would give significant success result. The logistic model looks as below approximately.&lt;/P&gt;
&lt;P&gt;P(success)= b0+b1*Treatment+b2*Time + b3* Treatment | Time + B4* Others.&lt;/P&gt;
&lt;P&gt;Treatment&amp;nbsp; is binary.&lt;/P&gt;
&lt;P&gt;Time is ordinal six time points 0, 1, 2, 3, 4, 5.&lt;/P&gt;
&lt;P&gt;Others are any other categorical (essentially binary) variables.&lt;/P&gt;
&lt;P&gt;If I wanted to do test at significant level 0.5 and power 0.8, how should I interpret the output from the code below? Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;proc power;&lt;BR /&gt;logistic&lt;BR /&gt;vardist("Success") = BINOMIAL (0.5, 1)&lt;BR /&gt;vardist("Treatment") = binomial(0.5, 1)&lt;BR /&gt;vardist("time") = ordinal((0 1 3 4 5):(0 0.1 0.2 0.3 0.4))&lt;BR /&gt;testpredictor = "Success"&lt;BR /&gt;covariates = "Treatment"|"time"&lt;BR /&gt;responseprob = 0.4 0.5 0.6 .07&lt;BR /&gt;testoddsratio = 1.4&lt;BR /&gt;alpha = 0.05&lt;BR /&gt;power = 0.8&lt;BR /&gt;ntotal = .;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 04:04:49 GMT</pubDate>
    <dc:creator>lichee</dc:creator>
    <dc:date>2024-09-16T04:04:49Z</dc:date>
    <item>
      <title>How to set cod to run power analysis for binary outcomes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944028#M47142</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I may not have good understanding of power analysis so far. But I'm trying to run a power analysis to see what sample size would give significant success result. The logistic model looks as below approximately.&lt;/P&gt;
&lt;P&gt;P(success)= b0+b1*Treatment+b2*Time + b3* Treatment | Time + B4* Others.&lt;/P&gt;
&lt;P&gt;Treatment&amp;nbsp; is binary.&lt;/P&gt;
&lt;P&gt;Time is ordinal six time points 0, 1, 2, 3, 4, 5.&lt;/P&gt;
&lt;P&gt;Others are any other categorical (essentially binary) variables.&lt;/P&gt;
&lt;P&gt;If I wanted to do test at significant level 0.5 and power 0.8, how should I interpret the output from the code below? Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;proc power;&lt;BR /&gt;logistic&lt;BR /&gt;vardist("Success") = BINOMIAL (0.5, 1)&lt;BR /&gt;vardist("Treatment") = binomial(0.5, 1)&lt;BR /&gt;vardist("time") = ordinal((0 1 3 4 5):(0 0.1 0.2 0.3 0.4))&lt;BR /&gt;testpredictor = "Success"&lt;BR /&gt;covariates = "Treatment"|"time"&lt;BR /&gt;responseprob = 0.4 0.5 0.6 .07&lt;BR /&gt;testoddsratio = 1.4&lt;BR /&gt;alpha = 0.05&lt;BR /&gt;power = 0.8&lt;BR /&gt;ntotal = .;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 04:04:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944028#M47142</guid>
      <dc:creator>lichee</dc:creator>
      <dc:date>2024-09-16T04:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to set cod to run power analysis for binary outcomes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944089#M47149</link>
      <description>&lt;P&gt;Are you asking how to interpret this part of the result?&lt;/P&gt;
&lt;DIV class="branch"&gt;&lt;BR /&gt;
&lt;DIV&gt;
&lt;DIV align="left"&gt;
&lt;TABLE class="table" summary="Procedure Power: Output" cellspacing="0" cellpadding="3"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="c m header" colspan="4" scope="colgroup"&gt;Computed N Total&lt;/TH&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="c m header" scope="col"&gt;Index&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;Response Prob&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;Actual Power&lt;/TH&gt;
&lt;TH class="c m header" scope="col"&gt;N Total&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;1&lt;/TH&gt;
&lt;TD class="r data"&gt;0.40&lt;/TD&gt;
&lt;TD class="r data"&gt;0.800&lt;/TD&gt;
&lt;TD class="r data"&gt;1160&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;2&lt;/TH&gt;
&lt;TD class="r data"&gt;0.50&lt;/TD&gt;
&lt;TD class="r data"&gt;0.800&lt;/TD&gt;
&lt;TD class="r data"&gt;1114&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;3&lt;/TH&gt;
&lt;TD class="r data"&gt;0.60&lt;/TD&gt;
&lt;TD class="r data"&gt;0.800&lt;/TD&gt;
&lt;TD class="r data"&gt;1160&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="l m rowheader" scope="row"&gt;4&lt;/TH&gt;
&lt;TD class="r data"&gt;0.07&lt;/TD&gt;
&lt;TD class="r data"&gt;0.800&lt;/TD&gt;
&lt;TD class="r data"&gt;4242&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First, I suspect that you might have meant to use&lt;/P&gt;
&lt;PRE&gt;responseprob = 0.4 0.5 0.6 &lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;0.7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;instead of the actual&lt;/P&gt;
&lt;PRE&gt;responseprob = 0.4 0.5 0.6 &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;.0&lt;/STRONG&gt;&lt;/FONT&gt;7&lt;/PRE&gt;
&lt;P&gt;Since you provided 4 options for responseprob you have an ntotal sample size calculated for each one.&lt;/P&gt;
&lt;P&gt;If the actual responseprob value comes in close to 0.4 then you need a sample size around 1160 and so on for each responseprob value.&lt;/P&gt;
&lt;P&gt;If you are asking why the last value had an Ntotal of 4242, much larger than the others, it is because of the probable typo of .07 where you may have intended 0.7&amp;nbsp;&amp;nbsp; . A lower probability of a response means that you need a larger sample to the needed number of "successes"&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 16 Sep 2024 14:28:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944089#M47149</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-16T14:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to set cod to run power analysis for binary outcomes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944102#M47150</link>
      <description>&lt;P&gt;Thanks, Ballard!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The interpretation is very helpful! Yes, I meant to use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;responseprob = 0.4 0.5 0.6 &lt;FONT color="#FF00FF"&gt;&lt;STRONG&gt;0.7&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;Further questions I have are&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. Do the binary outcome variable and any binary covariates need to be set up as&amp;nbsp; binomial(0.5, 1)?&lt;/P&gt;
&lt;P&gt;2. I currently have&amp;nbsp;vardist("time") = ordinal((0 1 3 4 5):(0 0.1 0.2 0.3 0.4)) even though there are six time points. I meant to skip the third time point (time =2). If I have all six time points and use vardist("time") = ordinal((0 1 &lt;FONT color="#FF00FF"&gt;2&lt;/FONT&gt; 3 4 5):(0 0.1 &lt;FONT color="#FF00FF"&gt;0&lt;/FONT&gt; 0.2 0.3 0.4)), does it mean the same thing as&amp;nbsp;vardist("time") = ordinal((0 1 3 4 5):(0 0.1 0.2 0.3 0.4)) ? How would interpretation be different if I use&amp;nbsp;vardist("time") = ordinal((0 1 3 4 5):(0 &lt;FONT color="#FF00FF"&gt;0.2 0.1&lt;/FONT&gt; 0.3 0.4)) ?&lt;/P&gt;
&lt;P&gt;3. I believe that the current code setup only considers power of using Treatment and Time only. If I wanted to add additional covariates, I just need to include additional vardist. For example, to add the female indicator (gender effect) in the power analysis, I am thinking the code below. Am I correct?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;proc power;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;logistic&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vardist("Success") = BINOMIAL (0.5, 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;vardist("Treatment") = binomial(0.5, 1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#FF00FF"&gt;vardist("Female")=binomial(0.5,1)&lt;/FONT&gt;&lt;BR /&gt;&lt;SPAN&gt;vardist("time") = ordinal((0 1 3 4 5):(0 0.1 0.2 0.3 0.4))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;testpredictor = "Success"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;covariates = "Treatment"|"time" &lt;FONT color="#FF00FF"&gt;"Female"&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;responseprob = 0.4 0.5 0.6 .07&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;testoddsratio = 1.4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;alpha = 0.05&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;power = 0.8&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ntotal = .;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 15:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944102#M47150</guid>
      <dc:creator>lichee</dc:creator>
      <dc:date>2024-09-16T15:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to set cod to run power analysis for binary outcomes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944113#M47151</link>
      <description>&lt;P&gt;I'm going to provide a fairly generic answer to the "does this &amp;lt;version of option&amp;gt; mean the same as &amp;lt;different setting of option&amp;gt;": Try it and see.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The distribution options for Ordinal, Beta, Binomial, Exponential, Gamma etc can be any valid set of values. The values should reflect something related to your data if known (or suspected) to be similar to some values such as from reading other research. Consider that if there are three somewhat similar studies and they reported response rates for similar populations (right-handed men with brown hair) like .35, .40 and .375 and you are also going to survey right-handed men with brown hair then a response rate in that .35 to .40 would be similar. So if research showed those studies also had a binomial distribution of some characteristic with&amp;nbsp; with a p of .2 and you are using the same item then you might use a binomial(.2,n).&lt;/P&gt;
&lt;P&gt;If you don't have such information then IF you use Binomial then a p of .5 tends to be the least sensitive and would tend to increase the required sample for a given power. Other parameters might be chosen for other suspected distributions.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 16:32:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/How-to-set-cod-to-run-power-analysis-for-binary-outcomes/m-p/944113#M47151</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-09-16T16:32:55Z</dc:date>
    </item>
  </channel>
</rss>

