<?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 by Class in Surveymeans? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811734#M320198</link>
    <description>&lt;P&gt;I don't think SURVEYMEANS compares the means of the two groups, just the same way as PROC MEANS doesn't compare the means of two groups. It produces a t-test to see if the mean is equal to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think to get the t-test comparing differences between two means, you would have to use the linear model version of the t-test to compare two means&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=fus;
cluster group;
class period;
model interest=period;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course, all of this is untested; if you want tested code, provide (a portion of) the actual data as SAS data step code.&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 19:19:16 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-05-05T19:19:16Z</dc:date>
    <item>
      <title>TTest by Class in Surveymeans?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811730#M320196</link>
      <description>&lt;P&gt;Hello! I wish to conduct a ttest comparing means of a vairable between the two groups in the class variable, but it doesn't seem to be doing that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class=" block-mark"&gt;&lt;SPAN class="sec-keyword"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="sec-keyword"&gt;surveymeans&lt;/SPAN&gt; &lt;SPAN class="keyword"&gt;data&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;=&lt;/SPAN&gt;&lt;SPAN class="text"&gt;fus &lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;t&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="keyword"&gt;cluster group&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="keyword"&gt;var&lt;/SPAN&gt;&lt;SPAN class="text"&gt; interest&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="keyword"&gt;class&lt;/SPAN&gt;&lt;SPAN class="text"&gt; period&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="sec-keyword"&gt;run&lt;/SPAN&gt;&lt;SPAN class="sep"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN class="sep"&gt;Whether I take out or leave in the class statment, I get only a single t statistic for my interest variable. I would like a t test comparing the mean in terest between my two periods (in the class statement). Any suggestions how I could do this? I would like to account for the clusters, which is why I don't want to use a regular proc ttest. Thank you!&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 05 May 2022 19:01:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811730#M320196</guid>
      <dc:creator>keherder</dc:creator>
      <dc:date>2022-05-05T19:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: TTest by Class in Surveymeans?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811734#M320198</link>
      <description>&lt;P&gt;I don't think SURVEYMEANS compares the means of the two groups, just the same way as PROC MEANS doesn't compare the means of two groups. It produces a t-test to see if the mean is equal to zero.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think to get the t-test comparing differences between two means, you would have to use the linear model version of the t-test to compare two means&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc surveyreg data=fus;
cluster group;
class period;
model interest=period;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Of course, all of this is untested; if you want tested code, provide (a portion of) the actual data as SAS data step code.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 19:19:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811734#M320198</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-05T19:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: TTest by Class in Surveymeans?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811737#M320200</link>
      <description>&lt;P&gt;Thanks so much, this worked perfectly!&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 19:26:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/TTest-by-Class-in-Surveymeans/m-p/811737#M320200</guid>
      <dc:creator>keherder</dc:creator>
      <dc:date>2022-05-05T19:26:42Z</dc:date>
    </item>
  </channel>
</rss>

