<?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: Power analysis simulation for multiple testing in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Power-analysis-simulation-for-multiple-testing/m-p/217117#M2269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you should include the BY statement:&lt;/P&gt;&lt;P&gt;BY N SampleID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your post, it sounds like you know how to simulate the data and your question is just "How do I use PROC MULTTEST?"&lt;/P&gt;&lt;P&gt;If that assumption is correct, I'll let others who are more familiar with PROC MULTTEST answer your question.&amp;nbsp; It doesn't sound like this question is connected to SAS/IML, so if you don't get a quick response, you might want to post this question to the SAS Statistcs Support Community: &lt;A _jive_internal="true" href="https://communities.sas.com/community/support-communities/sas_statistical_procedures"&gt;https://communities.sas.com/community/support-communities/sas_statistical_procedures&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2015 12:58:18 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2015-08-05T12:58:18Z</dc:date>
    <item>
      <title>Power analysis simulation for multiple testing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Power-analysis-simulation-for-multiple-testing/m-p/217116#M2268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some time ago, I wrote a code for power analysis for t-test, based on Rick's book on Simulations with SAS, and following a bug Rick published this code instead (here in the forum - the code is incomplete, I didn't want to publish it all although Rick already did):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote" modifiedtitle="true"&gt;
&lt;P&gt;/********************************************************************&lt;/P&gt;
&lt;P&gt; Effect of Sample Size on the Power of the t Test&lt;/P&gt;
&lt;P&gt; *******************************************************************/&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;%let NumSamples = 1000;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* number of samples */&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;data PowerSizeSim(drop=i Delta);&lt;/P&gt;
&lt;P&gt;call streaminit(321);&lt;/P&gt;
&lt;P&gt;Delta = 3;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* true difference between means */&lt;/P&gt;
&lt;P&gt;do N =&amp;nbsp; 5, 7, 8, 10, 12, 15, 20;/* sample size&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; do SampleID = 1 to &amp;amp;NumSamples;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do i = 1 to N;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = 1; x1 = rand("Normal", 0, 2);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c = 2; x1 = rand("Normal", Delta, 2); output;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* 2. Compute statistics */&lt;/P&gt;
&lt;P&gt;%ODSOff &lt;/P&gt;
&lt;P&gt;proc ttest data=PowerSizeSim; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by N SampleID; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; class c; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; var x1; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ods output ttests=TTests(where=(method="Pooled")); &lt;/P&gt;
&lt;P&gt;run; &lt;/P&gt;
&lt;P&gt;%ODSOn&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;/* 3. Construct indicator var for obs that reject H0 */ &lt;/P&gt;
&lt;P&gt;data ResultsSize; &lt;/P&gt;
&lt;P&gt;set TTests; &lt;/P&gt;
&lt;P&gt;RejectH0 = (Probt &amp;lt;= 0.05); &lt;/P&gt;
&lt;P&gt;run; &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;proc freq data=ResultsSize noprint; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; by N; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; tables RejectH0 / out=SimPower(where=(RejectH0=1));&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to make a change, and I am not sure how to.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of t-test, I want multiple tests. For example, the classic case: Clinical trial with 2 doses and a placebo, i.e., 2 comparisons (T1 vs. P and T2 vs. P). I want to use PROC &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; font-size: 13.3333330154419px; background-color: #ffffff;"&gt;MULTTEST &lt;/SPAN&gt;with the Hochberg adjustment for the p values, and I define success to be when at least one dose is significantly different than the placebo (more precisely the outcome variable X is different) . For simplicity we can assume equal variances. How would you change the syntax to to that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think (not sure) that the inner procedure I need is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;ods output pValues = PV;&lt;/P&gt;
&lt;P&gt;proc MULTTEST data = testdata hochberg pvals;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; class Group;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; test mean(X);&lt;/P&gt;
&lt;P&gt;&amp;nbsp; contrast 'T1 vs. P' -1 1 0;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; contrast 'T2 vs. P' -1 0 1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;It already creates a dataset with p values. So I need an assistant just in integrating it all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 09:55:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Power-analysis-simulation-for-multiple-testing/m-p/217116#M2268</guid>
      <dc:creator>BlueNose</dc:creator>
      <dc:date>2015-08-05T09:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Power analysis simulation for multiple testing</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Power-analysis-simulation-for-multiple-testing/m-p/217117#M2269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, you should include the BY statement:&lt;/P&gt;&lt;P&gt;BY N SampleID;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your post, it sounds like you know how to simulate the data and your question is just "How do I use PROC MULTTEST?"&lt;/P&gt;&lt;P&gt;If that assumption is correct, I'll let others who are more familiar with PROC MULTTEST answer your question.&amp;nbsp; It doesn't sound like this question is connected to SAS/IML, so if you don't get a quick response, you might want to post this question to the SAS Statistcs Support Community: &lt;A _jive_internal="true" href="https://communities.sas.com/community/support-communities/sas_statistical_procedures"&gt;https://communities.sas.com/community/support-communities/sas_statistical_procedures&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 12:58:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Power-analysis-simulation-for-multiple-testing/m-p/217117#M2269</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2015-08-05T12:58:18Z</dc:date>
    </item>
  </channel>
</rss>

