<?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: Difference in group means (PROC MEANS) vs means of difference (Paired ttest) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431915#M68700</link>
    <description>&lt;P&gt;I see your point. I initially thought that simply taking difference of group means was more like unpaired t-test as the observations were not paired.&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jan 2018 19:18:15 GMT</pubDate>
    <dc:creator>lizzy28</dc:creator>
    <dc:date>2018-01-29T19:18:15Z</dc:date>
    <item>
      <title>Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431876#M68693</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This came to my attention while checking my data. I tried to see if there is any significant difference from time 1 to time 2 for a group of individuals after an intervention occurred between time1 and time2. So I checked the means of the variables of interest and also did paired t-test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I thought that the difference in groups means (PROC MEANS first per time period, and then take difference between the two means) would be the same as the means of difference given by the paired t-tests, but it was not the case for all the variables. My understanding is that the means of difference given by the paired t-tests were calculated as the means of difference between two time periods.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to do manual calculation and got the same results (some with the same values in difference in group means and means of difference, and some with different values in them). I was wondering if it is related to some random missing data or other reasons.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could anyone see why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot!&lt;/P&gt;
&lt;P&gt;Lizi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431876#M68693</guid>
      <dc:creator>lizzy28</dc:creator>
      <dc:date>2018-01-29T17:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431883#M68694</link>
      <description>&lt;P&gt;My guess would be that you have some missing values for time1 and time2. A paired t-test would only consider records that don't have missing values for time1 and time2.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431883#M68694</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-29T17:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431887#M68695</link>
      <description>&lt;P&gt;Are you expecting the paired t-test to have the exact same results as the unpaired t-test?&lt;/P&gt;
&lt;P&gt;That's incorrect, the paired t-test will be different&amp;nbsp;than the unpaired t-test.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.quora.com/What-is-the-difference-between-a-paired-and-unpaired-t-test" target="_blank"&gt;https://www.quora.com/What-is-the-difference-between-a-paired-and-unpaired-t-test&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The differences should be the same mathematically, but the standard deviation is different - different handling of the n's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431887#M68695</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-29T17:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431888#M68696</link>
      <description>&lt;P&gt;Are you expecting the paired t-test to have the exact same results as the unpaired t-test?&lt;/P&gt;
&lt;P&gt;That's incorrect, the paired t-test will be different&amp;nbsp;than the unpaired t-test.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.quora.com/What-is-the-difference-between-a-paired-and-unpaired-t-test" target="_blank"&gt;https://www.quora.com/What-is-the-difference-between-a-paired-and-unpaired-t-test&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The differences should be the same mathematically, but the standard deviation is different - different handling of the n's.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 17:45:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431888#M68696</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-29T17:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431906#M68698</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;: While your response was marked as "the solution," I thought we ought to expand this discussion in case someone is looking to explain the difference that&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52727"&gt;@lizzy28&lt;/a&gt;&amp;nbsp;asked about.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52727"&gt;@lizzy28&lt;/a&gt;&amp;nbsp;compared the means obtained running proc means with those obtained running a paired t-test.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While you said that the differences should be the same mathematically .. I disagree! Obviously, I don't disagree that the paired and non-paired t-tests will be different even without missing values, but missing values will definitely have an effect on those means. e.g., here is an example comparing proc means and a paired t-test (which is what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/52727"&gt;@lizzy28&lt;/a&gt;&amp;nbsp;was comparing). I also included a non-paired t-test as well:&lt;/P&gt;
&lt;PRE&gt;data have;
  input time1 time2;
  cards;
1 3
2 5
99 .
7 8
. 15
5 5
. 14
;

proc means data=have;
  var time1 time2;
run;

proc ttest data=have;
  paired time2*time1;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431906#M68698</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2018-01-29T19:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431910#M68699</link>
      <description>I would say if you have missing values, that's a slightly different issue than say the 'base case' with all data. I'm not sure a paired t-test makes sense with missing data, because you're losing the paired test so if there are missing values the tests are not equivalent. I agree with you on that point</description>
      <pubDate>Mon, 29 Jan 2018 19:04:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431910#M68699</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-01-29T19:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Difference in group means (PROC MEANS) vs means of difference (Paired ttest)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431915#M68700</link>
      <description>&lt;P&gt;I see your point. I initially thought that simply taking difference of group means was more like unpaired t-test as the observations were not paired.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jan 2018 19:18:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Difference-in-group-means-PROC-MEANS-vs-means-of-difference/m-p/431915#M68700</guid>
      <dc:creator>lizzy28</dc:creator>
      <dc:date>2018-01-29T19:18:15Z</dc:date>
    </item>
  </channel>
</rss>

