<?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: I'm getting an error about a class. Please help in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350059#M63796</link>
    <description>&lt;P&gt;Your classification variable should have values of Human and Hybrid to compare the mean score for throughput and quality.&lt;/P&gt;
&lt;P&gt;Please see:&lt;/P&gt;
&lt;PRE&gt;data have;
   input HumT HybT HumQ HybQ;
datalines;
185.4 180.4 .889 .997
146.3 248.5 .791 .959
174.4 185.5 .866 .821
184.9 216.4 .888 .914
240.0 269.3 .916 .973
253.8 249.6 .923 .925
238.8 282.0 .894 .912
263.5 315.9 .934 .965
;
run;

data need;
   set have;
   length type $6.;
   Type = 'Human';
   Throughput = Humt;
   Quality = HumQ;
   output;
   Type = 'Hybrid';
   Throughput = HybT;
   Quality = HybQ;
   output;
   keep type Throughput Quality;
run;

proc ttest data=need;
   class type;
   var Throughput Quality;
run;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Apr 2017 14:26:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-04-14T14:26:05Z</dc:date>
    <item>
      <title>I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350045#M63791</link>
      <description>&lt;P&gt;This is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data robot;&lt;BR /&gt;infile 'C:\Users\paul\Downloads\Robot.dat' dlm=',';&lt;BR /&gt;input HumT 1-5 HybT 7-11;&lt;BR /&gt;run;&lt;BR /&gt;proc univariate data= robot normal;&lt;BR /&gt;qqplot HumT /normal (mu=est sigma=est);&lt;BR /&gt;by HumT;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc ttest data=robot sides=2 alpha=0.05 h0=0;&lt;BR /&gt;class HumT;&lt;BR /&gt;var HybT;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: The CLASS variable has more than two levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;185.4 180.4 .889 .997&lt;BR /&gt;146.3 248.5 .791 .959&lt;BR /&gt;174.4 185.5 .866 .821&lt;BR /&gt;184.9 216.4 .888 .914&lt;BR /&gt;240.0 269.3 .916 .973&lt;BR /&gt;253.8 249.6 .923 .925&lt;BR /&gt;238.8 282.0 .894 .912&lt;BR /&gt;263.5 315.9 .934 .965&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350045#M63791</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-04-14T14:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350051#M63793</link>
      <description>&lt;P&gt;By design, a t-test compares two groups. &amp;nbsp;That has nothing to do with SAS, it's just what a t-test does. &amp;nbsp;So your CLASS variable within PROC TTEST should only take on two values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you trying to accomplish, given that you have a data st with many values not two?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:12:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350051#M63793</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-14T14:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350052#M63794</link>
      <description>&lt;P&gt;I'm trying to compare if humans and hybrid differ for&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Throughput&lt;/LI&gt;&lt;LI&gt;Quality&lt;/LI&gt;&lt;/OL&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;OL&gt;&lt;LI&gt;Variable&lt;/LI&gt;&lt;/OL&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Columns&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Human throughput&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1-5&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;hybrid throughput&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;7-11&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Human quality&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;13-16&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Hybrid quality&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;18-21&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:14:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350052#M63794</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-04-14T14:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350056#M63795</link>
      <description>&lt;P&gt;I believe you will need to structure your data differently for that. &amp;nbsp;For example, you could read it in this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data robot;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;infile 'C:\Users\paul\Downloads\Robot.dat' dlm=',';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;idnum = _n_;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;category='Hybrid';&lt;BR /&gt;&lt;SPAN&gt;input throughput 7-11 quality 18-21 @ ;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;category='Human';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;input throughput 1-5 quality 13-16;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;185.4 180.4 .889 .997&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;146.3 248.5 .791 .959&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;174.4 185.5 .866 .821&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;184.9 216.4 .888 .914&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;240.0 269.3 .916 .973&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;253.8 249.6 .923 .925&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;238.8 282.0 .894 .912&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;263.5 315.9 .934 .965&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's not clear whether you would need idnum&amp;nbsp;later on, so I included it. &amp;nbsp;It lets you match up the human vs. hybrid observations.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:22:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350056#M63795</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-04-14T14:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350059#M63796</link>
      <description>&lt;P&gt;Your classification variable should have values of Human and Hybrid to compare the mean score for throughput and quality.&lt;/P&gt;
&lt;P&gt;Please see:&lt;/P&gt;
&lt;PRE&gt;data have;
   input HumT HybT HumQ HybQ;
datalines;
185.4 180.4 .889 .997
146.3 248.5 .791 .959
174.4 185.5 .866 .821
184.9 216.4 .888 .914
240.0 269.3 .916 .973
253.8 249.6 .923 .925
238.8 282.0 .894 .912
263.5 315.9 .934 .965
;
run;

data need;
   set have;
   length type $6.;
   Type = 'Human';
   Throughput = Humt;
   Quality = HumQ;
   output;
   Type = 'Hybrid';
   Throughput = HybT;
   Quality = HybQ;
   output;
   keep type Throughput Quality;
run;

proc ttest data=need;
   class type;
   var Throughput Quality;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350059#M63796</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-04-14T14:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350060#M63797</link>
      <description>Will you please take a look at the rest of the code. I can get it to work. Is this correct?&lt;BR /&gt;proc univariate data= robot normal;&lt;BR /&gt;qqplot HumT /normal (mu=est sigma=est);&lt;BR /&gt;by HumT;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc ttest data=robot sides=2 alpha=0.05 h0=0;&lt;BR /&gt;class HumT;&lt;BR /&gt;var HybT;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 14 Apr 2017 14:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350060#M63797</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-04-14T14:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: I'm getting an error about a class. Please help</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350074#M63799</link>
      <description>&lt;P&gt;it worked, Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 15:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/I-m-getting-an-error-about-a-class-Please-help/m-p/350074#M63799</guid>
      <dc:creator>pacruz</dc:creator>
      <dc:date>2017-04-14T15:21:45Z</dc:date>
    </item>
  </channel>
</rss>

