<?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: Sample size 3x3 crossover in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/500167#M25805</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I am really still struggling with this. i am not an expert at simulation so I tried a different approach but the results dont make sense:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Study;
   input Treatment $ Group $ VAS CellWgt;
   datalines;
         Placebo      Group1      131       1
         Placebo      Group2      131       1
         Placebo      Group3      131       1
         Drug1       Group1      161       1
         Drug1       Group2      161       1
         Drug1       Group3      161       1
         Drug2       Group1      204       1
         Drug2       Group2      204       1
         Drug2       Group3      204       1
    
;

proc glmpower data=Study;
   class Treatment Group;
   model VAS = Treatment Group;
   weight CellWgt;
   contrast "Drug2 vs. others" 	Treatment  -1 -1 2;
   contrast "Drug1 vs. others" 	Treatment  -1 2 -1;
   contrast "Placebo vs. Drug2" Treatment   1  0 -1;
   contrast "Placebo vs. Drug1" Treatment   1 -1  0;
   contrast "Drug1 vs. Drug2"   Treatment   0  1  -1;
   power
      nfractional
      stddev      = 67
      ncovariates = 1
      corrxy      = 0.8
      alpha       = 0.017
      ntotal      = .
      power       = 0.8;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could anyone please give me help with this? I know everyone has a million things to do but if someone has time to suggest a working code or show me how to do it with simulation i would eternally appreciate it.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 30 Sep 2018 11:10:25 GMT</pubDate>
    <dc:creator>ammarhm</dc:creator>
    <dc:date>2018-09-30T11:10:25Z</dc:date>
    <item>
      <title>Sample size 3x3 crossover</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491623#M25515</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;any suggestion for how to do sample size calculation for a crossover 3x3 design?&lt;/P&gt;
&lt;P&gt;Kind regards&lt;/P&gt;
&lt;P&gt;A&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 13:18:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491623#M25515</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2018-08-31T13:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size 3x3 crossover</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491625#M25516</link>
      <description>&lt;P&gt;PROC GLMPOWER ought to be able to figure out what sample size you need.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example somewhat similar to your experiment in the PROC GLMPOWER documentation&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=statcdc&amp;amp;cdcVersion=14.2&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_glmpower_examples02.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=statcdc&amp;amp;cdcVersion=14.2&amp;amp;docsetId=statug&amp;amp;docsetTarget=statug_glmpower_examples02.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Aug 2018 13:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491625#M25516</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-08-31T13:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size 3x3 crossover</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491876#M25531</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I am still struggling to&amp;nbsp;do the power calculation after 2 days working with this &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Could you or anyone else please help further? Any suggestions of the SAS code or an example online dealing with a similar problem? I couldn't really use the example you mentioned above&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Here is what I am thinking of: The means after the treatments (A, B, C) are presented in a data table:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="150"&gt;
&lt;P&gt;Treatment&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;A&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;B&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;C&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="150"&gt;
&lt;P&gt;Group1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;20&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;25&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="150"&gt;
&lt;P&gt;Group2&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;35&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;30&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;45&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="150"&gt;
&lt;P&gt;Group1&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;40&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;40&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="150"&gt;
&lt;P&gt;55&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming a SD 10 and alpha 0.05 and needed power of 0.8 and a correlation of 0,6, what would the code be to calculate sample size? or how do i modify the code in the suggested webpage by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;to solve this sample size problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Very much appreciated&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 02 Sep 2018 08:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491876#M25531</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2018-09-02T08:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size 3x3 crossover</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491964#M25535</link>
      <description>&lt;P&gt;A crossover is a mixed model of some complexity, and I don't think any of the power analysis PROCs address it directly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll point you to &lt;A href="https://communities.sas.com/t5/SAS-Statistical-Procedures/Sample-size-calculations-with-SAS/td-p/77609" target="_self"&gt;this SAS Community thread&lt;/A&gt;. Basically, there are two approaches: simulation and a nice trick discussed by Walt Stroup in his texts and papers. Here's a&amp;nbsp;&lt;A href="https://support.sas.com/resources/papers/proceedings16/11663-2016.pdf" target="_self"&gt;more recent paper by Walt&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This thread is a few years old, and&amp;nbsp;&lt;A href="https://www.sas.com/store/prodBK_65378_en.html?storeCode=SAS_US" target="_self"&gt;Rick Wicklin's book on simulation&lt;/A&gt;&amp;nbsp;is now published.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With either approach,&amp;nbsp;once you've done the power analysis, you now have code already written for the analysis of actual data. Sweet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Sep 2018 02:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/491964#M25535</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-09-03T02:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size 3x3 crossover</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/500167#M25805</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/1708"&gt;@sld&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I am really still struggling with this. i am not an expert at simulation so I tried a different approach but the results dont make sense:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Study;
   input Treatment $ Group $ VAS CellWgt;
   datalines;
         Placebo      Group1      131       1
         Placebo      Group2      131       1
         Placebo      Group3      131       1
         Drug1       Group1      161       1
         Drug1       Group2      161       1
         Drug1       Group3      161       1
         Drug2       Group1      204       1
         Drug2       Group2      204       1
         Drug2       Group3      204       1
    
;

proc glmpower data=Study;
   class Treatment Group;
   model VAS = Treatment Group;
   weight CellWgt;
   contrast "Drug2 vs. others" 	Treatment  -1 -1 2;
   contrast "Drug1 vs. others" 	Treatment  -1 2 -1;
   contrast "Placebo vs. Drug2" Treatment   1  0 -1;
   contrast "Placebo vs. Drug1" Treatment   1 -1  0;
   contrast "Drug1 vs. Drug2"   Treatment   0  1  -1;
   power
      nfractional
      stddev      = 67
      ncovariates = 1
      corrxy      = 0.8
      alpha       = 0.017
      ntotal      = .
      power       = 0.8;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Could anyone please give me help with this? I know everyone has a million things to do but if someone has time to suggest a working code or show me how to do it with simulation i would eternally appreciate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2018 11:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/500167#M25805</guid>
      <dc:creator>ammarhm</dc:creator>
      <dc:date>2018-09-30T11:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Sample size 3x3 crossover</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/500202#M25808</link>
      <description>&lt;P&gt;Your code generates a warning (in the log) and odd results because you have specified Group as a fixed effects factor in the model, and in the data step you have specified Group effects of exactly zero. If effects of Group were instead nonzero, then the code would run. But this code is for a two-way factorial (without interaction) in a completely randomized design, and you intend your design to be a crossover.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Replication in a crossover design can take different forms. For example, subjects could be blocked in sets of 3 ("squares"), or subjects could be independent (i.e., not clustered or blocked). Your power analysis needs to mimic your intended design.&amp;nbsp;How do you envision doing replication in your study?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once&amp;nbsp;you know how you plan to replicate (and need only to figure out how many replications), then it may be helpful to write the code (which I will call the "data analysis code") for the experimental design that you anticipate. You can then compare the model in your data analysis code to the model in your power analysis code: if the models do not match, then you need a different power analysis specification.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You most likely will not be able to do power analysis for a crossover design with GLMPOWER because a crossover design is fundamentally a mixed model, and GLMPOWER does not accommodate mixed models. In the SAS Community thread that I linked to in my previous message, pay particular attention to the response by lvm who references a text and a paper by Walt Stroup; I referenced a second paper in my previous message in this thread. You also could study Ch 12 in &lt;A href="https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/prodBK_59882_en.html" target="_self"&gt;https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/prodBK_59882_en.html&lt;/A&gt;.&amp;nbsp;Stroup's approach takes advantage of the ability to hold variance parameters constant (PARMS ... / HOLD) and does not require simulation of data. It is the approach that I use to estimate sample size for a mixed model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Edit: Note also that your CONTRAST statements are incorrect. By default, the order of levels for&amp;nbsp;Treatment is alphabetical: Drug1, Drug2, Placebo. Your coefficients need to match the order of levels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Sep 2018 19:53:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Sample-size-3x3-crossover/m-p/500202#M25808</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-09-30T19:53:25Z</dc:date>
    </item>
  </channel>
</rss>

