<?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: Help with SAS Anova codes in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252968#M13338</link>
    <description>&lt;P&gt;Maybe like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data case3;
input trait $1 test $3 score;
datalines;
L C 22
L C 16
L C 21
L C 17
H C 21
H C 35
H C 33
H C 25
H C 25
H C 28
L T 20
L T 18
L T 22
H T 24
H T 23
H T 19
H T 21
H T 22
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I notice that this is an unbalanced design (some groups are different sizes than others).&amp;nbsp; For these data you'll want to use PROC GLM instead of ANOVA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Feb 2016 21:17:53 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2016-02-27T21:17:53Z</dc:date>
    <item>
      <title>Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252963#M13333</link>
      <description>&lt;P&gt;I am trying to figure out what I am doing wrong with this ANOVA code. Help please.&lt;/P&gt;&lt;P&gt;question&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A researcher was interested in the influence of test administration practices (in-class testing vs. take-home testing) on student anxiety. A volunteer sample of 18 undergraduate psychology students participated. The students were pretested with a trait anxiety instrument, and on the basis of their scores, were classified as &lt;EM&gt;High Anxious&lt;/EM&gt; or &lt;EM&gt;Low Anxious&lt;/EM&gt;. Students within each anxiety category were then randomly assigned to receive either a take-home midterm examination or an in-class midterm examination. The researcher hypothesized that the ‘impact’ of test type would be greatest for the high anxiety students. On the day of the examination, the researcher administered a test anxiety instrument to obtain a measure of the students’ anxiety about taking the midterm. The following test anxiety scores were obtained:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Student Trait Anxiety&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Type of Test&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;In-Class&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Take-home&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;Low&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;P&gt;16&lt;/P&gt;&lt;P&gt;21&lt;/P&gt;&lt;P&gt;17&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;18&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;High&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;21&lt;/P&gt;&lt;P&gt;35&lt;/P&gt;&lt;P&gt;33&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;28&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;24&lt;/P&gt;&lt;P&gt;23&lt;/P&gt;&lt;P&gt;19&lt;/P&gt;&lt;P&gt;21&lt;/P&gt;&lt;P&gt;22&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; case3;&lt;/P&gt;&lt;P&gt;input trait $ &lt;STRONG&gt;1&lt;/STRONG&gt; test &lt;STRONG&gt;3&lt;/STRONG&gt; score &lt;STRONG&gt;5&lt;/STRONG&gt;-&lt;STRONG&gt;7&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;L 22&lt;/P&gt;&lt;P&gt;L 16&lt;/P&gt;&lt;P&gt;L 21&lt;/P&gt;&lt;P&gt;L 17&lt;/P&gt;&lt;P&gt;H 21&lt;/P&gt;&lt;P&gt;H 35&lt;/P&gt;&lt;P&gt;H 33&lt;/P&gt;&lt;P&gt;H 25&lt;/P&gt;&lt;P&gt;H 25&lt;/P&gt;&lt;P&gt;H 28&lt;/P&gt;&lt;P&gt;L 20&lt;/P&gt;&lt;P&gt;L 18&lt;/P&gt;&lt;P&gt;L 22&lt;/P&gt;&lt;P&gt;H 24&lt;/P&gt;&lt;P&gt;H 23&lt;/P&gt;&lt;P&gt;H 19&lt;/P&gt;&lt;P&gt;H 21&lt;/P&gt;&lt;P&gt;H 22&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;ANOVA&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;CLASS TRAIT TEST;&lt;/P&gt;&lt;P&gt;MODEL SCORE = TRAIT TEST TRAIT*TEST;&lt;/P&gt;&lt;P&gt;MEANS TRAIT TEST/TUKEY;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 20:31:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252963#M13333</guid>
      <dc:creator>jmoseley</dc:creator>
      <dc:date>2016-02-27T20:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252964#M13334</link>
      <description>&lt;P&gt;After the DATA step, put&lt;/P&gt;
&lt;P&gt;PROC PRINT; RUN;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You will see that although your description and the PROC ANOVA code use three&amp;nbsp;variables, you are only creating two variables in the DATA step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 20:42:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252964#M13334</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-02-27T20:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252966#M13336</link>
      <description>Thank you for your insights Rick. I tried to change the data step to trait $ test $ class home; but it is giving me tons of other errors. By the way when I input the full question on the help board, it somehow failed to enter in-class and take-home data in two separate columns.</description>
      <pubDate>Sat, 27 Feb 2016 20:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252966#M13336</guid>
      <dc:creator>jmoseley</dc:creator>
      <dc:date>2016-02-27T20:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252967#M13337</link>
      <description>&lt;P&gt;I think you need to code the in-class and take-home variable.&lt;/P&gt;
&lt;P&gt;Maybe use 'C' for in-class and 'T' for take-home.&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 21:13:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252967#M13337</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-02-27T21:13:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252968#M13338</link>
      <description>&lt;P&gt;Maybe like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data case3;
input trait $1 test $3 score;
datalines;
L C 22
L C 16
L C 21
L C 17
H C 21
H C 35
H C 33
H C 25
H C 25
H C 28
L T 20
L T 18
L T 22
H T 24
H T 23
H T 19
H T 21
H T 22
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I notice that this is an unbalanced design (some groups are different sizes than others).&amp;nbsp; For these data you'll want to use PROC GLM instead of ANOVA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 21:17:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252968#M13338</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-02-27T21:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252972#M13339</link>
      <description>Thank you very much Rick, I will try this...Josie</description>
      <pubDate>Sat, 27 Feb 2016 22:08:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252972#M13339</guid>
      <dc:creator>jmoseley</dc:creator>
      <dc:date>2016-02-27T22:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252973#M13340</link>
      <description>I tried those codes Rick, and all it is giving me is a frequency table. These are my codes.&lt;BR /&gt;data case3;&lt;BR /&gt;input trait $ 1 test $ 3 count;&lt;BR /&gt;datalines;&lt;BR /&gt;L C 22&lt;BR /&gt;L C 16&lt;BR /&gt;L C 21&lt;BR /&gt;L C 17&lt;BR /&gt;H C 21&lt;BR /&gt;H C 35&lt;BR /&gt;H C 33&lt;BR /&gt;H C 25&lt;BR /&gt;H C 25&lt;BR /&gt;H C 28&lt;BR /&gt;H T 20&lt;BR /&gt;H T 18&lt;BR /&gt;H T 22&lt;BR /&gt;H T 24&lt;BR /&gt;H T 23&lt;BR /&gt;H T 19&lt;BR /&gt;H T 21&lt;BR /&gt;H T 22&lt;BR /&gt;;&lt;BR /&gt;PROC GLM data=case3;&lt;BR /&gt;CLASS TRAIT TEST;&lt;BR /&gt;MODEL SCORE = TRAIT TEST;&lt;BR /&gt;RUN;&lt;BR /&gt;proc print;&lt;BR /&gt;run;</description>
      <pubDate>Sat, 27 Feb 2016 22:24:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252973#M13340</guid>
      <dc:creator>jmoseley</dc:creator>
      <dc:date>2016-02-27T22:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252990#M13346</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data case3;
input trait $  test $  count;
datalines;
L C 22
L C 16
L C 21
L C 17
H C 21
H C 35
H C 33
H C 25
H C 25
H C 28
L T 20
L T 18
L T 22
H T 24
H T 23
H T 19
H T 21
H T 22
;
run;
/*Check mean std for each cell*/
proc tabulate data=case3;
class trait test;
var count;
table trait*test,count*(mean std n);
run;
/*Check main effect*/
proc glm data=case3;
class trait test;
model count=trait test/ss1 ss3;
run;
proc glm data=case3;
class trait test;
model count=test trait /ss1 ;
run;
/*Check full model*/
proc glm data=case3;
class trait test;
model count=trait|test/ss1 ss3;
run;








&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;ARTICLE id="IDX18"&gt;
&lt;TABLE class="table"&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="b header" scope="col"&gt;Source&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;DF&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Type I SS&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Mean Square&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;F Value&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;F&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="rowheader" scope="row"&gt;trait&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;137.1544012&lt;/TD&gt;
&lt;TD class="r data"&gt;137.1544012&lt;/TD&gt;
&lt;TD class="r data"&gt;10.13&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0067&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="rowheader" scope="row"&gt;test&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;48.9186983&lt;/TD&gt;
&lt;TD class="r data"&gt;48.9186983&lt;/TD&gt;
&lt;TD class="r data"&gt;3.61&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0782&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="rowheader" scope="row"&gt;trait*test&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;52.0713450&lt;/TD&gt;
&lt;TD class="r data"&gt;52.0713450&lt;/TD&gt;
&lt;TD class="r data"&gt;3.84&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0701&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;ARTICLE id="IDX19"&gt;
&lt;TABLE class="table"&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="b header" scope="col"&gt;Source&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;DF&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Type III SS&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Mean Square&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;F Value&lt;/TH&gt;
&lt;TH class="r b header" scope="col"&gt;Pr&amp;nbsp;&amp;gt;&amp;nbsp;F&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="rowheader" scope="row"&gt;trait&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;119.0187135&lt;/TD&gt;
&lt;TD class="r data"&gt;119.0187135&lt;/TD&gt;
&lt;TD class="r data"&gt;8.79&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0103&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="rowheader" scope="row"&gt;test&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;26.6678363&lt;/TD&gt;
&lt;TD class="r data"&gt;26.6678363&lt;/TD&gt;
&lt;TD class="r data"&gt;1.97&lt;/TD&gt;
&lt;TD class="r data"&gt;0.1824&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TH class="rowheader" scope="row"&gt;trait*test&lt;/TH&gt;
&lt;TD class="r data"&gt;1&lt;/TD&gt;
&lt;TD class="r data"&gt;52.0713450&lt;/TD&gt;
&lt;TD class="r data"&gt;52.0713450&lt;/TD&gt;
&lt;TD class="r data"&gt;3.84&lt;/TD&gt;
&lt;TD class="r data"&gt;0.0701&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/ARTICLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both kind of ANOVA(SS1 SS3) show trait is significant , test and trait*test - (interactive effect) are NOT&amp;nbsp;&lt;SPAN&gt;significant.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So there is NO significant&amp;nbsp;influence of test administration practices (in-class testing vs. take-home testing) on student anxiety.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2016 03:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252990#M13346</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-28T03:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SAS Anova codes</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252994#M13347</link>
      <description>Thank you again very much for your assistance Mr. Keshan, it is very much appreciated.</description>
      <pubDate>Sun, 28 Feb 2016 04:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Help-with-SAS-Anova-codes/m-p/252994#M13347</guid>
      <dc:creator>jmoseley</dc:creator>
      <dc:date>2016-02-28T04:52:44Z</dc:date>
    </item>
  </channel>
</rss>

