<?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: Paired T test in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608599#M177150</link>
    <description>&lt;P&gt;You need to restructure your data so that SAS knows which pairs go together. That means you need your data in a format like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ID    Pre    Post
1      5        8
2      4        8
3      6        7
....&lt;/PRE&gt;
&lt;P&gt;You can use PROC TRANSPOSE to restructure your data and then run PROC TTEST as indicated by others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a tutorial on transposing from a long data set to a wide data set with examples that should get you started.&lt;BR /&gt;Long to Wide:&lt;BR /&gt;&lt;A href="http://15011990(ddmmyyyy)pattern.some" target="_self"&gt;https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124145"&gt;@Xinhui&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi There&lt;/P&gt;
&lt;P&gt;I have a dummy variable "d" and another variable "csrp"&lt;/P&gt;
&lt;P&gt;I want use the paired T test to examine, the "csrp" is significant different between "0" and "1" group of "d'.&lt;/P&gt;
&lt;P&gt;How should I code it?&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 01 Dec 2019 20:48:56 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-12-01T20:48:56Z</dc:date>
    <item>
      <title>Paired T test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608596#M177147</link>
      <description>&lt;P&gt;Hi There&lt;/P&gt;&lt;P&gt;I have a dummy variable "d" and another variable "csrp"&lt;/P&gt;&lt;P&gt;I want use the paired T test to examine, the "csrp" is significant different between "0" and "1" group of "d'.&lt;/P&gt;&lt;P&gt;How should I code it?&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 19:49:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608596#M177147</guid>
      <dc:creator>Xinhui</dc:creator>
      <dc:date>2019-12-01T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Paired T test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608597#M177148</link>
      <description>&lt;P&gt;Example:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_ttest_examples03.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetVersion=14.3&amp;amp;docsetTarget=statug_ttest_examples03.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 19:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608597#M177148</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-01T19:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Paired T test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608598#M177149</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124145"&gt;@Xinhui&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code would perform a t-test (mean comparison of two groups defined by the CLASS statement)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ttest data=have;
	var csrp;
	class d; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Are you sure you want to perform a &lt;EM&gt;paired&lt;/EM&gt; t-test? In this case, you need to define the couple of observations between the two groups. Do you have an ID variable to identify pairs?&lt;/P&gt;
&lt;P&gt;In this case, you should have two variables (csrp value for each group; a pair by row) and the syntax would be:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc ttest data=have;
	paired csrp1*csrp2;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 Dec 2019 20:17:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608598#M177149</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-12-01T20:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Paired T test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608599#M177150</link>
      <description>&lt;P&gt;You need to restructure your data so that SAS knows which pairs go together. That means you need your data in a format like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ID    Pre    Post
1      5        8
2      4        8
3      6        7
....&lt;/PRE&gt;
&lt;P&gt;You can use PROC TRANSPOSE to restructure your data and then run PROC TTEST as indicated by others.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a tutorial on transposing from a long data set to a wide data set with examples that should get you started.&lt;BR /&gt;Long to Wide:&lt;BR /&gt;&lt;A href="http://15011990(ddmmyyyy)pattern.some" target="_self"&gt;https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/124145"&gt;@Xinhui&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi There&lt;/P&gt;
&lt;P&gt;I have a dummy variable "d" and another variable "csrp"&lt;/P&gt;
&lt;P&gt;I want use the paired T test to examine, the "csrp" is significant different between "0" and "1" group of "d'.&lt;/P&gt;
&lt;P&gt;How should I code it?&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Dec 2019 20:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/608599#M177150</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-12-01T20:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Paired T test</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/953634#M372549</link>
      <description>&lt;P&gt;This was very useful&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&amp;nbsp;, many thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Dr. Abhijeet Safai&lt;/P&gt;</description>
      <pubDate>Mon, 16 Dec 2024 08:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Paired-T-test/m-p/953634#M372549</guid>
      <dc:creator>DrAbhijeetSafai</dc:creator>
      <dc:date>2024-12-16T08:01:42Z</dc:date>
    </item>
  </channel>
</rss>

