<?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: defining pvalue in ttest in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608871#M76679</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215282"&gt;@Sathish_jammy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear Experts,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset containing 2 columns - Weight, Follow_weight&lt;/P&gt;
&lt;P&gt;I need to find the pval value using ttest for those variables.&lt;/P&gt;
&lt;P&gt;Weight column contains 120 values in each row, F_wt column contains only 78 rows&lt;/P&gt;
&lt;P&gt;Just for a sample, I share the data (have) here.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Wt F_wt;
cards;
56.8 59.2 
75.2 71.3
88.0 85.1
76.5 76.2
101
26.5&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Does the below method will return correct pval?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output ttests=ttest
           statistics=tstats;
proc ttest data=have;
paired wt*f_wt;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Don't use the above dataset for analysis, It's just for a visual.&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;For your example data likely not. The way your data step for the example data is set the value 26.5 is paired with 101. Is that intentional? If not then you may have intended the data step to be:&lt;/P&gt;
&lt;PRE&gt;data have;
infile datalines truncover;
input Wt F_wt;
cards;
56.8 59.2 
75.2 71.3
88.0 85.1
76.5 76.2
101
26.5
;&lt;/PRE&gt;
&lt;P&gt;Which results in values of WT with missing values for F_wt.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2019 21:47:58 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2019-12-02T21:47:58Z</dc:date>
    <item>
      <title>defining pvalue in ttest</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608423#M76643</link>
      <description>&lt;P&gt;Dear Experts,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset containing 2 columns - Weight, Follow_weight&lt;/P&gt;&lt;P&gt;I need to find the pval value using ttest for those variables.&lt;/P&gt;&lt;P&gt;Weight column contains 120 values in each row, F_wt column contains only 78 rows&lt;/P&gt;&lt;P&gt;Just for a sample, I share the data (have) here.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Wt F_wt;
cards;
56.8 59.2 
75.2 71.3
88.0 85.1
76.5 76.2
101
26.5&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Does the below method will return correct pval?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output ttests=ttest
           statistics=tstats;
proc ttest data=have;
paired wt*f_wt;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Don't use the above dataset for analysis, It's just for a visual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 09:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608423#M76643</guid>
      <dc:creator>Sathish_jammy</dc:creator>
      <dc:date>2019-11-30T09:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: defining pvalue in ttest</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608429#M76644</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215282"&gt;@Sathish_jammy&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the Weight column contains 120 values in each row and F_wt column contains only 78 rows, I assume that their are missing values for F_wt.&lt;/P&gt;
&lt;P&gt;In this case, if you want to perform a Paired Sample Means t-test, the syntax of your t-test is correct. The test will take into account only pairs (so it will exclude rows with missing values) &amp;nbsp;: it will calculate the difference between each pair of Wt and F-wt and then perform the test (-&amp;gt; p_value)&lt;/P&gt;
&lt;P&gt;In your example : 6 rows, but only 4 pairs as 2 values are missing.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Nov 2019 10:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608429#M76644</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-11-30T10:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: defining pvalue in ttest</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608871#M76679</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/215282"&gt;@Sathish_jammy&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear Experts,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a dataset containing 2 columns - Weight, Follow_weight&lt;/P&gt;
&lt;P&gt;I need to find the pval value using ttest for those variables.&lt;/P&gt;
&lt;P&gt;Weight column contains 120 values in each row, F_wt column contains only 78 rows&lt;/P&gt;
&lt;P&gt;Just for a sample, I share the data (have) here.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input Wt F_wt;
cards;
56.8 59.2 
75.2 71.3
88.0 85.1
76.5 76.2
101
26.5&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Does the below method will return correct pval?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
ods output ttests=ttest
           statistics=tstats;
proc ttest data=have;
paired wt*f_wt;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Don't use the above dataset for analysis, It's just for a visual.&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;For your example data likely not. The way your data step for the example data is set the value 26.5 is paired with 101. Is that intentional? If not then you may have intended the data step to be:&lt;/P&gt;
&lt;PRE&gt;data have;
infile datalines truncover;
input Wt F_wt;
cards;
56.8 59.2 
75.2 71.3
88.0 85.1
76.5 76.2
101
26.5
;&lt;/PRE&gt;
&lt;P&gt;Which results in values of WT with missing values for F_wt.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2019 21:47:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/defining-pvalue-in-ttest/m-p/608871#M76679</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-02T21:47:58Z</dc:date>
    </item>
  </channel>
</rss>

