<?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: TTEST-paired data analysis in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760500#M37078</link>
    <description>&lt;P&gt;Is the file give to you like that or is it a CSV, TXT or Excel file to import?&lt;BR /&gt;&lt;BR /&gt;How to import a data set - VIDEO&lt;BR /&gt;&lt;A href="https://video.sas.com/detail/videos/sas-analytics-u/video/4664327156001/reading-and-generating-csv-files-using-snippets-in-sas-studio?autoStart=true" target="_blank" rel="noopener"&gt;https://video.sas.com/detail/videos/sas-analytics-u/video/4664327156001/reading-and-generating-csv-files-using-snippets-in-sas-studio?autoStart=true&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;How to read directly via CARDS&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/inputting-data-into-sas/" target="_blank" rel="noopener"&gt;https://stats.idre.ucla.edu/sas/modules/inputting-data-into-sas/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;How to do a Paired T-Test&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_tteex03.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_tteex03.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It seems like you'll need to wrangle your data as well a bit, so instructions on how to that are here. Look at the PROC TTEST example first to see how they structured their data for a paired test.&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/" target="_blank" rel="noopener"&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;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/392851"&gt;@mpc5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;HELP WITH THIS!&lt;/P&gt;
&lt;P&gt;Create a temporary SAS data set called&amp;nbsp;&lt;EM&gt;birds &lt;/EM&gt;from this data set:&lt;/P&gt;
&lt;P&gt;A Typical -0.255&lt;BR /&gt;A Odd -0.324&lt;BR /&gt;B Typical -0.213&lt;BR /&gt;B Odd -0.185&lt;BR /&gt;C Typical -0.190&lt;BR /&gt;C Odd -0.299&lt;BR /&gt;D Typical -0.185&lt;BR /&gt;D Odd -0.144&lt;BR /&gt;E Typical -0.045&lt;BR /&gt;E Odd -0.027&lt;BR /&gt;F Typical -0.025&lt;BR /&gt;F Odd -0.039&lt;BR /&gt;G Typical -0.015&lt;BR /&gt;G Odd -0.264&lt;BR /&gt;H Typical 0.003&lt;BR /&gt;H Odd -0.077&lt;BR /&gt;I Typical 0.015&lt;BR /&gt;I Odd -0.017&lt;BR /&gt;J Typical 0.020&lt;BR /&gt;J Odd -0.169&lt;BR /&gt;K Typical 0.023&lt;BR /&gt;K Odd -0.096&lt;BR /&gt;L Typical 0.040&lt;BR /&gt;L Odd -0.330&lt;BR /&gt;M Typical 0.040&lt;BR /&gt;M Odd -0.346&lt;BR /&gt;N Typical 0.050&lt;BR /&gt;N Odd -0.191&lt;BR /&gt;O Typical 0.055&lt;BR /&gt;O Odd -0.128&lt;BR /&gt;P Typical 0.058&lt;BR /&gt;P Odd -0.182&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I use this '&lt;EM&gt;birds'&lt;/EM&gt;&amp;nbsp;data set to prepare it for a &lt;STRONG&gt;paired data analysis??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How do I use the &lt;STRONG&gt;TTEST&lt;/STRONG&gt; procedure to &lt;STRONG&gt;compare the mean yellowness of the odd and typical feathers?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;</description>
    <pubDate>Mon, 09 Aug 2021 23:10:42 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-08-09T23:10:42Z</dc:date>
    <item>
      <title>TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760498#M37077</link>
      <description>&lt;P&gt;HELP WITH THIS!&lt;/P&gt;&lt;P&gt;Create a temporary SAS data set called&amp;nbsp;&lt;EM&gt;birds &lt;/EM&gt;from this data set:&lt;/P&gt;&lt;P&gt;A Typical -0.255&lt;BR /&gt;A Odd -0.324&lt;BR /&gt;B Typical -0.213&lt;BR /&gt;B Odd -0.185&lt;BR /&gt;C Typical -0.190&lt;BR /&gt;C Odd -0.299&lt;BR /&gt;D Typical -0.185&lt;BR /&gt;D Odd -0.144&lt;BR /&gt;E Typical -0.045&lt;BR /&gt;E Odd -0.027&lt;BR /&gt;F Typical -0.025&lt;BR /&gt;F Odd -0.039&lt;BR /&gt;G Typical -0.015&lt;BR /&gt;G Odd -0.264&lt;BR /&gt;H Typical 0.003&lt;BR /&gt;H Odd -0.077&lt;BR /&gt;I Typical 0.015&lt;BR /&gt;I Odd -0.017&lt;BR /&gt;J Typical 0.020&lt;BR /&gt;J Odd -0.169&lt;BR /&gt;K Typical 0.023&lt;BR /&gt;K Odd -0.096&lt;BR /&gt;L Typical 0.040&lt;BR /&gt;L Odd -0.330&lt;BR /&gt;M Typical 0.040&lt;BR /&gt;M Odd -0.346&lt;BR /&gt;N Typical 0.050&lt;BR /&gt;N Odd -0.191&lt;BR /&gt;O Typical 0.055&lt;BR /&gt;O Odd -0.128&lt;BR /&gt;P Typical 0.058&lt;BR /&gt;P Odd -0.182&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I use this '&lt;EM&gt;birds'&lt;/EM&gt;&amp;nbsp;data set to prepare it for a &lt;STRONG&gt;paired data analysis??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;How do I use the &lt;STRONG&gt;TTEST&lt;/STRONG&gt; procedure to &lt;STRONG&gt;compare the mean yellowness of the odd and typical feathers?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 23:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760498#M37077</guid>
      <dc:creator>mpc5</dc:creator>
      <dc:date>2021-08-09T23:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760500#M37078</link>
      <description>&lt;P&gt;Is the file give to you like that or is it a CSV, TXT or Excel file to import?&lt;BR /&gt;&lt;BR /&gt;How to import a data set - VIDEO&lt;BR /&gt;&lt;A href="https://video.sas.com/detail/videos/sas-analytics-u/video/4664327156001/reading-and-generating-csv-files-using-snippets-in-sas-studio?autoStart=true" target="_blank" rel="noopener"&gt;https://video.sas.com/detail/videos/sas-analytics-u/video/4664327156001/reading-and-generating-csv-files-using-snippets-in-sas-studio?autoStart=true&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;How to read directly via CARDS&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/inputting-data-into-sas/" target="_blank" rel="noopener"&gt;https://stats.idre.ucla.edu/sas/modules/inputting-data-into-sas/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;How to do a Paired T-Test&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_tteex03.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_code_tteex03.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It seems like you'll need to wrangle your data as well a bit, so instructions on how to that are here. Look at the PROC TTEST example first to see how they structured their data for a paired test.&lt;BR /&gt;&lt;A href="https://stats.idre.ucla.edu/sas/modules/how-to-reshape-data-long-to-wide-using-proc-transpose/" target="_blank" rel="noopener"&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;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/392851"&gt;@mpc5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;HELP WITH THIS!&lt;/P&gt;
&lt;P&gt;Create a temporary SAS data set called&amp;nbsp;&lt;EM&gt;birds &lt;/EM&gt;from this data set:&lt;/P&gt;
&lt;P&gt;A Typical -0.255&lt;BR /&gt;A Odd -0.324&lt;BR /&gt;B Typical -0.213&lt;BR /&gt;B Odd -0.185&lt;BR /&gt;C Typical -0.190&lt;BR /&gt;C Odd -0.299&lt;BR /&gt;D Typical -0.185&lt;BR /&gt;D Odd -0.144&lt;BR /&gt;E Typical -0.045&lt;BR /&gt;E Odd -0.027&lt;BR /&gt;F Typical -0.025&lt;BR /&gt;F Odd -0.039&lt;BR /&gt;G Typical -0.015&lt;BR /&gt;G Odd -0.264&lt;BR /&gt;H Typical 0.003&lt;BR /&gt;H Odd -0.077&lt;BR /&gt;I Typical 0.015&lt;BR /&gt;I Odd -0.017&lt;BR /&gt;J Typical 0.020&lt;BR /&gt;J Odd -0.169&lt;BR /&gt;K Typical 0.023&lt;BR /&gt;K Odd -0.096&lt;BR /&gt;L Typical 0.040&lt;BR /&gt;L Odd -0.330&lt;BR /&gt;M Typical 0.040&lt;BR /&gt;M Odd -0.346&lt;BR /&gt;N Typical 0.050&lt;BR /&gt;N Odd -0.191&lt;BR /&gt;O Typical 0.055&lt;BR /&gt;O Odd -0.128&lt;BR /&gt;P Typical 0.058&lt;BR /&gt;P Odd -0.182&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I use this '&lt;EM&gt;birds'&lt;/EM&gt;&amp;nbsp;data set to prepare it for a &lt;STRONG&gt;paired data analysis??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How do I use the &lt;STRONG&gt;TTEST&lt;/STRONG&gt; procedure to &lt;STRONG&gt;compare the mean yellowness of the odd and typical feathers?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Mon, 09 Aug 2021 23:10:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760500#M37078</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-08-09T23:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760570#M37080</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/392851"&gt;@mpc5&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;HELP WITH THIS!&lt;/P&gt;
&lt;P&gt;Create a temporary SAS data set called&amp;nbsp;&lt;EM&gt;birds &lt;/EM&gt;from this data set:&lt;/P&gt;
&lt;P&gt;A Typical -0.255&lt;BR /&gt;A Odd -0.324&lt;BR /&gt;B Typical -0.213&lt;BR /&gt;B Odd -0.185&lt;BR /&gt;C Typical -0.190&lt;BR /&gt;C Odd -0.299&lt;BR /&gt;D Typical -0.185&lt;BR /&gt;D Odd -0.144&lt;BR /&gt;E Typical -0.045&lt;BR /&gt;E Odd -0.027&lt;BR /&gt;F Typical -0.025&lt;BR /&gt;F Odd -0.039&lt;BR /&gt;G Typical -0.015&lt;BR /&gt;G Odd -0.264&lt;BR /&gt;H Typical 0.003&lt;BR /&gt;H Odd -0.077&lt;BR /&gt;I Typical 0.015&lt;BR /&gt;I Odd -0.017&lt;BR /&gt;J Typical 0.020&lt;BR /&gt;J Odd -0.169&lt;BR /&gt;K Typical 0.023&lt;BR /&gt;K Odd -0.096&lt;BR /&gt;L Typical 0.040&lt;BR /&gt;L Odd -0.330&lt;BR /&gt;M Typical 0.040&lt;BR /&gt;M Odd -0.346&lt;BR /&gt;N Typical 0.050&lt;BR /&gt;N Odd -0.191&lt;BR /&gt;O Typical 0.055&lt;BR /&gt;O Odd -0.128&lt;BR /&gt;P Typical 0.058&lt;BR /&gt;P Odd -0.182&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I use this '&lt;EM&gt;birds'&lt;/EM&gt;&amp;nbsp;data set to prepare it for a &lt;STRONG&gt;paired data analysis??&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;How do I use the &lt;STRONG&gt;TTEST&lt;/STRONG&gt; procedure to &lt;STRONG&gt;compare the mean yellowness of the odd and typical feathers?&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What are the variable names? Paired on what?&lt;/P&gt;
&lt;P&gt;How do we know which variable holds "yellownesss"? You don't say. Such details matter.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 10:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760570#M37080</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-08-10T10:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760639#M37082</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Birds;
length Group $7;
input ID $ Group Value;
datalines;
A Typical -0.255
A Odd -0.324
B Typical -0.213
B Odd -0.185
C Typical -0.190
C Odd -0.299
D Typical -0.185
D Odd -0.144
E Typical -0.045
E Odd -0.027
F Typical -0.025
F Odd -0.039
G Typical -0.015
G Odd -0.264
H Typical 0.003
H Odd -0.077
I Typical 0.015
I Odd -0.017
J Typical 0.020
J Odd -0.169
K Typical 0.023
K Odd -0.096
L Typical 0.040
L Odd -0.330
M Typical 0.040
M Odd -0.346
N Typical 0.050
N Odd -0.191
O Typical 0.055
O Odd -0.128
P Typical 0.058
P Odd -0.182
;

/* transpose from Long to Wide */
proc transpose data=Birds out=BirdsWide(rename=(COL1=Typical COL2=Odd));
	by Id;
run;

proc ttest data=BirdsWide;
   paired Typical*Odd;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Aug 2021 13:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760639#M37082</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-08-10T13:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760641#M37083</link>
      <description>&lt;P&gt;Assuming the letters A, B, ... represent individuals, then you have the two values for each individual on separate lines of the data. As noted in the "Student's t-test: two dependent (paired) samples" item in the list of Frequently Asked-for Statistics (FASTats) in the Important Links section of the Statistical Procedures Community page, you can do a paired t-test in PROC UNIVARIATE by analyzing the difference of the paired values and testing that the mean difference is zero. The following computes the difference for each individual and then analyzes it in PROC UNIVARIATE. The test is in the "Tests for Location" table.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
input id $ type $ y;
retain ty;
if type="Typical" then ty=y;
else diff=ty-y;
if diff ne . then output;
datalines;
A Typical -0.255
A Odd -0.324
B Typical -0.213
B Odd -0.185
C Typical -0.190
C Odd -0.299
D Typical -0.185
D Odd -0.144
E Typical -0.045
E Odd -0.027
F Typical -0.025
F Odd -0.039
G Typical -0.015
G Odd -0.264
H Typical 0.003
H Odd -0.077
I Typical 0.015
I Odd -0.017
J Typical 0.020
J Odd -0.169
K Typical 0.023
K Odd -0.096
L Typical 0.040
L Odd -0.330
M Typical 0.040
M Odd -0.346
N Typical 0.050
N Odd -0.191
O Typical 0.055
O Odd -0.128
P Typical 0.058
P Odd -0.182
;
proc univariate; 
var diff;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Aug 2021 13:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760641#M37083</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-08-10T13:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760675#M37087</link>
      <description>16 PROC TTEST DATA = birdswide;&lt;BR /&gt;17 TITLE 'Comparison of Birds feathers Yellowness';&lt;BR /&gt;18 paired typical*odd;&lt;BR /&gt;ERROR: Variable TYPICAL not found.&lt;BR /&gt;ERROR: Variable ODD not found.&lt;BR /&gt;19 var feather;&lt;BR /&gt;ERROR: Variable FEATHER not found.&lt;BR /&gt;20 RUN;&lt;BR /&gt;</description>
      <pubDate>Tue, 10 Aug 2021 14:40:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760675#M37087</guid>
      <dc:creator>mpc5</dc:creator>
      <dc:date>2021-08-10T14:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: TTEST-paired data analysis</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760676#M37088</link>
      <description>&lt;P&gt;variable is bird-feather-yellowness measure&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 14:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/TTEST-paired-data-analysis/m-p/760676#M37088</guid>
      <dc:creator>mpc5</dc:creator>
      <dc:date>2021-08-10T14:41:41Z</dc:date>
    </item>
  </channel>
</rss>

