<?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  ERROR: The CLASS variable does not have two levels. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362041#M85485</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/97352"&gt;@AaronJ&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am running PROC Ttest withe following code:&lt;/P&gt;
&lt;P&gt;PROC IMPORT DATAFILE=FILEREF&lt;BR /&gt;DBMS=XLSX&lt;BR /&gt;OUT=WORK.IMPORT;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;&lt;BR /&gt;data AllEvents;&lt;BR /&gt;set import;&lt;/P&gt;
&lt;P&gt;RUN;&lt;BR /&gt;if Phase=1;&lt;BR /&gt;logVWC=log(VWC);&lt;/P&gt;
&lt;P&gt;proc ttest cochran ci=equal umpu;&lt;BR /&gt;Class Phase;&lt;BR /&gt;Var logVWC;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS gives me the following error message:&amp;nbsp;&lt;SPAN&gt; ERROR: The CLASS variable does not have two levels.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Excel file that is imported in the first statement, Phase variables are 1 and 2, so it definitely has 2 and only 2 levels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any insights would be appreciated&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS doesn't care about the Excel file that is imported. SAS only cares about WORK.ALLEVENTS. What is in WORK.ALLEVENTS, how many levels does PHASE have in WORK.ALLEVENTS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, I think I know the answer because in your code you have&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if Phase=1;&lt;/PRE&gt;
&lt;P&gt;which means that the variable PHASE in WORK.ALLEVENTS has only one level ... it only has PHASE=1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2017 17:21:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2017-05-26T17:21:42Z</dc:date>
    <item>
      <title>Ttest  ERROR: The CLASS variable does not have two levels.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362037#M85484</link>
      <description>&lt;P&gt;I am running PROC Ttest withe following code:&lt;/P&gt;&lt;P&gt;PROC IMPORT DATAFILE=FILEREF&lt;BR /&gt;DBMS=XLSX&lt;BR /&gt;OUT=WORK.IMPORT;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;&lt;BR /&gt;data AllEvents;&lt;BR /&gt;set import;&lt;/P&gt;&lt;P&gt;RUN;&lt;BR /&gt;if Phase=1;&lt;BR /&gt;logVWC=log(VWC);&lt;/P&gt;&lt;P&gt;proc ttest cochran ci=equal umpu;&lt;BR /&gt;Class Phase;&lt;BR /&gt;Var logVWC;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS gives me the following error message:&amp;nbsp;&lt;SPAN&gt; ERROR: The CLASS variable does not have two levels.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the Excel file that is imported in the first statement, Phase variables are 1 and 2, so it definitely has 2 and only 2 levels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any insights would be appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 17:07:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362037#M85484</guid>
      <dc:creator>AaronJ</dc:creator>
      <dc:date>2017-05-26T17:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ttest  ERROR: The CLASS variable does not have two levels.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362041#M85485</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/97352"&gt;@AaronJ&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I am running PROC Ttest withe following code:&lt;/P&gt;
&lt;P&gt;PROC IMPORT DATAFILE=FILEREF&lt;BR /&gt;DBMS=XLSX&lt;BR /&gt;OUT=WORK.IMPORT;&lt;BR /&gt;GETNAMES=YES;&lt;BR /&gt;RUN;&lt;BR /&gt;data AllEvents;&lt;BR /&gt;set import;&lt;/P&gt;
&lt;P&gt;RUN;&lt;BR /&gt;if Phase=1;&lt;BR /&gt;logVWC=log(VWC);&lt;/P&gt;
&lt;P&gt;proc ttest cochran ci=equal umpu;&lt;BR /&gt;Class Phase;&lt;BR /&gt;Var logVWC;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAS gives me the following error message:&amp;nbsp;&lt;SPAN&gt; ERROR: The CLASS variable does not have two levels.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the Excel file that is imported in the first statement, Phase variables are 1 and 2, so it definitely has 2 and only 2 levels.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any insights would be appreciated&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;SAS doesn't care about the Excel file that is imported. SAS only cares about WORK.ALLEVENTS. What is in WORK.ALLEVENTS, how many levels does PHASE have in WORK.ALLEVENTS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Well, I think I know the answer because in your code you have&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;if Phase=1;&lt;/PRE&gt;
&lt;P&gt;which means that the variable PHASE in WORK.ALLEVENTS has only one level ... it only has PHASE=1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 17:21:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362041#M85485</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-05-26T17:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ttest  ERROR: The CLASS variable does not have two levels.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362044#M85486</link>
      <description>&lt;P&gt;thanks, i think you and i caught that at the same time. I tried to delete this post, but SAS told me i didn't have sufficient privileges.&amp;nbsp;&lt;BR /&gt;Again, thanks for pointing out the error.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 17:27:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Ttest-ERROR-The-CLASS-variable-does-not-have-two-levels/m-p/362044#M85486</guid>
      <dc:creator>AaronJ</dc:creator>
      <dc:date>2017-05-26T17:27:02Z</dc:date>
    </item>
  </channel>
</rss>

