<?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 error messages proc ANOVA in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878880#M43458</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;IM A BEGINNER IN SAS .&lt;/P&gt;&lt;P&gt;NEED TO PERFORM ANALYSIS TO &amp;nbsp;MY DEPENDENT AND INDEPENDENT VARIABLES TO CHECK FOR HYPOTHESES.&lt;/P&gt;&lt;P&gt;MY DEPENDENT VARIABLE&amp;nbsp; :&amp;nbsp; &amp;nbsp;TENSION&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INDEPENDENT VARIABLES : COTTON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA fiber;&lt;BR /&gt;INPUT cotton $ tension @@;&lt;BR /&gt;CARDS;&lt;BR /&gt;15 7 15 7 15 15 15 11 15 9&lt;BR /&gt;20 12 20 17 20 12 20 18 20 18&lt;BR /&gt;25 14 25 18 25 18 25 19 25 19&lt;BR /&gt;30 19 30 25 30 22 30 19 30 23&lt;BR /&gt;35 7 35 10 35 11 35 15 35 11&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;proc anova data=fiber;&lt;BR /&gt;class cotton;&lt;BR /&gt;model cotton=tension ;&lt;BR /&gt;means cotton/ lines alpha=0.01 lsd;&lt;BR /&gt;means cotton/ hovtest=bartlett;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I got three error messages:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Variable cotton&amp;nbsp; in list does not match type prescribed for this list.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR:&amp;nbsp; Effects used in the MEANS statement must have appeared previously in the MODEL statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR:&amp;nbsp; Effects used in the MEANS statement must have appeared previously in the MODEL statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COULD SOMEBODY HELP ME WITH WHAT KIND OF&amp;nbsp; ERRORS&amp;nbsp; ARE THESE /ANY OTHER WAY TO PERFORM ANALYSIS FOR ALL THESE VARIABLE ALTOGETHER.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANKS IN ADVANCE.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2023 03:44:56 GMT</pubDate>
    <dc:creator>sasnewbie97</dc:creator>
    <dc:date>2023-06-02T03:44:56Z</dc:date>
    <item>
      <title>error messages proc ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878880#M43458</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;IM A BEGINNER IN SAS .&lt;/P&gt;&lt;P&gt;NEED TO PERFORM ANALYSIS TO &amp;nbsp;MY DEPENDENT AND INDEPENDENT VARIABLES TO CHECK FOR HYPOTHESES.&lt;/P&gt;&lt;P&gt;MY DEPENDENT VARIABLE&amp;nbsp; :&amp;nbsp; &amp;nbsp;TENSION&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INDEPENDENT VARIABLES : COTTON&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I wrote:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DATA fiber;&lt;BR /&gt;INPUT cotton $ tension @@;&lt;BR /&gt;CARDS;&lt;BR /&gt;15 7 15 7 15 15 15 11 15 9&lt;BR /&gt;20 12 20 17 20 12 20 18 20 18&lt;BR /&gt;25 14 25 18 25 18 25 19 25 19&lt;BR /&gt;30 19 30 25 30 22 30 19 30 23&lt;BR /&gt;35 7 35 10 35 11 35 15 35 11&lt;BR /&gt;;&lt;BR /&gt;RUN;&lt;BR /&gt;proc anova data=fiber;&lt;BR /&gt;class cotton;&lt;BR /&gt;model cotton=tension ;&lt;BR /&gt;means cotton/ lines alpha=0.01 lsd;&lt;BR /&gt;means cotton/ hovtest=bartlett;&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However I got three error messages:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Variable cotton&amp;nbsp; in list does not match type prescribed for this list.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR:&amp;nbsp; Effects used in the MEANS statement must have appeared previously in the MODEL statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR:&amp;nbsp; Effects used in the MEANS statement must have appeared previously in the MODEL statement.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;COULD SOMEBODY HELP ME WITH WHAT KIND OF&amp;nbsp; ERRORS&amp;nbsp; ARE THESE /ANY OTHER WAY TO PERFORM ANALYSIS FOR ALL THESE VARIABLE ALTOGETHER.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANKS IN ADVANCE.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 03:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878880#M43458</guid>
      <dc:creator>sasnewbie97</dc:creator>
      <dc:date>2023-06-02T03:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: error messages proc ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878926#M43459</link>
      <description>&lt;P&gt;Seems to me, this is backwards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;model cotton=tension ;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want cotton to be the independent variable and tension to be the dependent variable, the above code is wrong, you have specified the opposite.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From now on, please post code by clicking on the "Little Running Man" icon and pasting the code into the window that appears. From now on, please provide the ENTIRE log for the PROC or DATA step with the problem; not just the error messages, by clicking on the &amp;lt;/&amp;gt; icon and pasting the log into the window that appears. From now on, DO NOT TYPE IN ALL CAPITALS. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 10:01:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878926#M43459</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-02T10:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: error messages proc ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878950#M43460</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
I think you should switch into PROC GLM for HOVTEST.
proc anova is only suited for balance design.
proc glm is suited for bothe balance and unbalance design.
But since your data is balance design(each cotton group have five obs),
you could use proc anova, but you should take COTTON as independent variable in model.
*/
DATA fiber;
INPUT cotton $ tension @@;
CARDS;
15 7 15 7 15 15 15 11 15 9
20 12 20 17 20 12 20 18 20 18
25 14 25 18 25 18 25 19 25 19
30 19 30 25 30 22 30 19 30 23
35 7 35 10 35 11 35 15 35 11
;
RUN;
proc anova data=fiber;
class cotton;
model tension=cotton ;  /*&amp;lt;-- Here is */
means cotton/ lines alpha=0.01 lsd;
means cotton/ hovtest=bartlett;
run;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1685705709708.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84654i95356037DC544930/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1685705709708.png" alt="Ksharp_0-1685705709708.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 11:35:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878950#M43460</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2023-06-02T11:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: error messages proc ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878961#M43461</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;proc anova is only suited for balance design.&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is true for two-way and higher experimental designs. For one-way anova, which this is, it will handle balanced or unbalanced properly.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 12:16:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/878961#M43461</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-02T12:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: error messages proc ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/879082#M43465</link>
      <description>&lt;DIV class="xis-refProc"&gt;
&lt;DIV id="statug.anova.anova_sec_overview" class="AAsection"&gt;
&lt;P&gt;. In analysis of variance, a &lt;STRONG&gt;continuous&lt;/STRONG&gt; &lt;STRONG&gt;response&lt;/STRONG&gt; variable, known as a &lt;SPAN&gt;&lt;EM&gt;dependent variable&lt;/EM&gt;&lt;/SPAN&gt;,is measured under experimental conditions identified by classification variables, known as &lt;SPAN&gt;&lt;EM&gt;independent variables&lt;/EM&gt;&lt;/SPAN&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You variable COTTON is character. So it is not continuous. If that was not intentional then you need to fix your INPUT statement.&lt;/P&gt;
&lt;P&gt;The $ next to cotton in this code makes the variable character:&lt;/P&gt;
&lt;PRE&gt;DATA fiber;
INPUT cotton $ tension @@;
CARDS;
15 7 15 7 15 15 15 11 15 9
20 12 20 17 20 12 20 18 20 18
25 14 25 18 25 18 25 19 25 19
30 19 30 25 30 22 30 19 30 23
35 7 35 10 35 11 35 15 35 11
;
RUN;&lt;/PRE&gt;
&lt;P&gt;So on the model statement:&lt;/P&gt;
&lt;PRE&gt;model cotton=tension ;&lt;/PRE&gt;
&lt;P&gt;You have cotton as the dependent variable and the value for ANOVA has to be numeric. Which is why you get this error:&lt;/P&gt;
&lt;PRE&gt;ERROR: Variable cotton  in list does not match type prescribed for this list.&lt;/PRE&gt;
&lt;P&gt;SAS basically only has two types of variables, numeric or character. So when you get "does not match type" you know that the value should be of the other type. SAS is even nice enough to tell you which variable.&lt;/P&gt;
&lt;P&gt;The base syntax for model statements is &lt;/P&gt;
&lt;PRE&gt;MODEL dependents = effects &amp;lt;/ options&amp;gt;; &lt;/PRE&gt;
&lt;P&gt;There are many regression procedures with Model statements. All follow this general syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The other two errors occur because of the first error (not uncommon). Since the MODEL statement is syntactically incorrect because of where Cotton appears there is no Model statement in effect. That generates the errors related to effects not appearing on the (non-existent) Model statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 02 Jun 2023 16:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/879082#M43465</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-06-02T16:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: error messages proc ANOVA</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/881565#M43613</link>
      <description>&lt;P&gt;To follow up on&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;'s guidance - I think all of your error messages can be dealt with by removing the $ in your INPUT statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jun 2023 18:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/error-messages-proc-ANOVA/m-p/881565#M43613</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2023-06-20T18:11:50Z</dc:date>
    </item>
  </channel>
</rss>

