<?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: PROC TTEST compare two groups in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782962#M249611</link>
    <description>&lt;P&gt;Before we show any code, could you clarify something here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I wish to compare the N value 148 at visit 2 with exactly 148 values at visit1. I think I can do this by selecting the pat_id with the 148values at visit2 and &lt;FONT color="#FF0000"&gt;comparing that with exactly the same patients&lt;/FONT&gt;(with the same pat_id) in visit1&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If there are two measurements for each of the 148 patients, then you would want to do a paired t-test for these 148 patients. Is that what you have in mind?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 17:08:15 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-11-29T17:08:15Z</dc:date>
    <item>
      <title>PROC TTEST compare two groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782874#M249576</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;
&lt;P&gt;Am trying to compare &lt;SPAN&gt;&amp;nbsp;C-reactive protein (&lt;/SPAN&gt;&lt;EM&gt;CRP&lt;/EM&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;values of patients at visit1 and vist 2&lt;/P&gt;
&lt;P&gt;I have table that looks like this :&lt;/P&gt;
&lt;TABLE width="400"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="80"&gt;Variable&lt;/TD&gt;
&lt;TD width="80"&gt;VISIT&lt;/TD&gt;
&lt;TD width="80"&gt;N&lt;/TD&gt;
&lt;TD width="80"&gt;Mean&lt;/TD&gt;
&lt;TD width="80"&gt;STD&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="80"&gt;CRP&lt;/TD&gt;
&lt;TD width="80"&gt;1&lt;/TD&gt;
&lt;TD width="80"&gt;300&lt;/TD&gt;
&lt;TD width="80"&gt;3,64&lt;/TD&gt;
&lt;TD width="80"&gt;1,19&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="80"&gt;CRP&lt;/TD&gt;
&lt;TD width="80"&gt;2&lt;/TD&gt;
&lt;TD width="80"&gt;148&lt;/TD&gt;
&lt;TD width="80"&gt;1,95&lt;/TD&gt;
&lt;TD width="80"&gt;0,93&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wish to compare the N value 148 at visit 2 with exactly 148 values at visit1. I think I can do this by selecting the pat_id with the 148values at visit2 and comparing that with exactly the same patients(with the same pat_id) in visit1&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question is how can I adjust my code to do that?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;here is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ttest data= myinfile plots=none;
class visit;
var CRP;
where visit in (1,2);
ods output ttests=ttest_CRP;
ods output Statistics=Stat_CRP;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 29 Nov 2021 11:16:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782874#M249576</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-11-29T11:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TTEST compare two groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782892#M249581</link>
      <description>&lt;P&gt;Check this example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1638188595219.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66204i86DB87F6A4305B5E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1638188595219.png" alt="Ksharp_0-1638188595219.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_1-1638188615366.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66205iD3672E3D82C6F427/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_1-1638188615366.png" alt="Ksharp_1-1638188615366.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_2-1638188644186.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66206i5ED919FACEB5F206/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_2-1638188644186.png" alt="Ksharp_2-1638188644186.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 12:24:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782892#M249581</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-11-29T12:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TTEST compare two groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782960#M249610</link>
      <description>Adding the link to that example, including the code.&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_ttest_examples01.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_ttest_examples01.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 29 Nov 2021 17:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782960#M249610</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-29T17:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TTEST compare two groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782962#M249611</link>
      <description>&lt;P&gt;Before we show any code, could you clarify something here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;I wish to compare the N value 148 at visit 2 with exactly 148 values at visit1. I think I can do this by selecting the pat_id with the 148values at visit2 and &lt;FONT color="#FF0000"&gt;comparing that with exactly the same patients&lt;/FONT&gt;(with the same pat_id) in visit1&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If there are two measurements for each of the 148 patients, then you would want to do a paired t-test for these 148 patients. Is that what you have in mind?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 17:08:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/782962#M249611</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-11-29T17:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: PROC TTEST compare two groups</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/783088#M249655</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;: Thanks for that.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;Yes, that is approximately what I want. I think I will try that myself. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 09:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-TTEST-compare-two-groups/m-p/783088#M249655</guid>
      <dc:creator>Anita_n</dc:creator>
      <dc:date>2021-11-30T09:42:03Z</dc:date>
    </item>
  </channel>
</rss>

