<?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: Testing differences in means of scale data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412007#M67383</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Because it is the mean of scale data that I am testing between the two groups, the proc ttest statement doesn't work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Given the stated&amp;nbsp;sample sizes, the Central Limit Theorem does apply and you could use PROC TTEST. I would do a paired analysis on the 50 samples where you have both pre and post.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Nov 2017 16:44:16 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2017-11-09T16:44:16Z</dc:date>
    <item>
      <title>Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/411977#M67381</link>
      <description>&lt;P&gt;I merged two datasets, a pre and post, but due to a small post size compared to the pre, I am treating the data as two independent samples and am aiming to run a ttest:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data prepostindep;&lt;BR /&gt;set pre&amp;nbsp; post;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to test the difference between the mean of a scale that was created by:&lt;/P&gt;&lt;P&gt;meanscale1pre=mean (of q5 q6 q7a q8 q9 ); *data that came from pre dataset&lt;BR /&gt;meanscale1post=mean (of q5p q6p q7ap q8p q9p); *data that came from post dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Because it is the mean of scale data that I am testing between the two groups, the proc ttest statement doesn't work.&lt;/P&gt;&lt;P&gt;I tried running proc genmod but go this error:&lt;/P&gt;&lt;P&gt;ERROR: No valid observations due to invalid or missing values in the response, explanatory, offset, frequency, or weight variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possibly due to the fact that there are missing values for both pre and post since post only has variables that end in p (shown above), while pre doesn't and vice versa. In addition, the sample size for post is about 50 whereas it's 400 for the pre.&amp;nbsp; That may change as we receive more posts in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's the best way to analyze this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 15:47:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/411977#M67381</guid>
      <dc:creator>lboyd</dc:creator>
      <dc:date>2017-11-09T15:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412007#M67383</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Because it is the mean of scale data that I am testing between the two groups, the proc ttest statement doesn't work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;Given the stated&amp;nbsp;sample sizes, the Central Limit Theorem does apply and you could use PROC TTEST. I would do a paired analysis on the 50 samples where you have both pre and post.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 16:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412007#M67383</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-09T16:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412010#M67384</link>
      <description>&lt;P&gt;I am also running a paired analysis, but I also want to run it as two independent samples, what would I run or how would I transform the data?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 16:48:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412010#M67384</guid>
      <dc:creator>lboyd</dc:creator>
      <dc:date>2017-11-09T16:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412019#M67385</link>
      <description>&lt;P&gt;I don't understand the question&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 16:53:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412019#M67385</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-11-09T16:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412031#M67388</link>
      <description>&lt;P&gt;I want to run an independent ttest using proc ttest, however the data is set up in a way that will not allow that since I am testing the difference between the means of two scales (as described above). Scale1pre is comprised of 5 questions, while Scale2post has those same questions but are from differently named variables. To conduct a proper proc ttest, I need to have a class statement, but here I do not, and I have two variables, scale1pre and scale1post. It is simple to run this data using a paired ttest, but I am wondering how to treat the data as two independent samples. I hope I am describing this clearly, let me know if I am not.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 17:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412031#M67388</guid>
      <dc:creator>lboyd</dc:creator>
      <dc:date>2017-11-09T17:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412047#M67389</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/130148"&gt;@lboyd&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I want to run an independent ttest using proc ttest, however the data is set up in a way that will not allow that since I am testing the difference between the means of two scales (as described above). Scale1pre is comprised of 5 questions, while Scale2post has those same questions but are from differently named variables. To conduct a proper proc ttest, I need to have a class statement, but here I do not, and I have two variables, scale1pre and scale1post. It is simple to run this data using a paired ttest, but I am wondering how to treat the data as two independent samples. I hope I am describing this clearly, let me know if I am not.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you want to run a TTest your data has to conform to rules. ONE variable not 5. You may have to reshape data by getting a single variable and adding a classification variable. Here is an example modifying the data from the online Ttest documentation for a paired test to your test:&lt;/P&gt;
&lt;PRE&gt;data pressure;
   input SBPbefore SBPafter @@;
   datalines;
120 128   124 131   130 131   118 127
140 132   128 125   140 141   135 137
126 118   130 132   126 129   127 135
;
run;

data forttest;
   set pressure;
   Period= 'Before' ; SBP =  SBPbefore; output;
   Period= 'After'  ; SBP =  SBPAfter; output;
   keep period SBP;
run;

proc ttest data=forttest;
   class period;
   var SBP;
run;&lt;/PRE&gt;
&lt;P&gt;r&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2017 21:11:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412047#M67389</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-11-09T21:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Testing differences in means of scale data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412049#M67390</link>
      <description>This is exactly what I was looking for. Thank you!</description>
      <pubDate>Thu, 09 Nov 2017 17:38:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Testing-differences-in-means-of-scale-data/m-p/412049#M67390</guid>
      <dc:creator>lboyd</dc:creator>
      <dc:date>2017-11-09T17:38:31Z</dc:date>
    </item>
  </channel>
</rss>

