<?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: proc anova in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811199#M39969</link>
    <description>&lt;P&gt;I guess I don't know why you are subsetting your data, and then using PROC ANOVA to essentially just do a t test.&amp;nbsp; Your output from the first example should give a Tukey adjusted confidence interval for the difference between the levels of the variable 'leaf'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a Tukey adjust p value for the difference, shift to PROC GLM, and replace "cldiff" with "pdiff" in the MEANS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&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>Tue, 03 May 2022 12:31:37 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2022-05-03T12:31:37Z</dc:date>
    <item>
      <title>proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811134#M39959</link>
      <description>&lt;P&gt;Can you add in the code below the ANOVA output comparaing the averages "LEAF" 2 in 2?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;anova&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=tab;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lgd_m18=leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;means&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf/&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;tukey&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;cldiff&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without me having to segregate first, like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; tab1 tab2 tab3;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; tab;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf &amp;lt;= &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; tab1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;2&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; &amp;lt;= leaf &amp;lt;= &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; tab2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;if&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;or&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#08726d"&gt;3&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;then&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; tab3;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;anova&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=tab1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lgd_m18=leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;means&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf/&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;tukey&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;cldiff&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;anova&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=tab2;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lgd_m18=leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;means&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf/&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;tukey&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;cldiff&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;proc&lt;/STRONG&gt;&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;anova&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;data&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=tab3;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;class&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;model&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; lgd_m18=leaf;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;means&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; leaf/&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#0000ff"&gt;tukey&lt;/FONT&gt; &lt;FONT face="Courier New" size="3" color="#0000ff"&gt;cldiff&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3" color="#000080"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 20:46:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811134#M39959</guid>
      <dc:creator>Thalitacosta</dc:creator>
      <dc:date>2022-05-02T20:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811136#M39961</link>
      <description>&lt;P&gt;Without seeing your data, I doubt I can help. Show us the data, please.(And by the way &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/391297"&gt;@Thalitacosta&lt;/a&gt;, we shouldn't have to consistently ask you to show us the data, this should be done every single time with every single question)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And provide more explanation of this, please: "comparaing the averages "LEAF" 2 in 2?"&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 21:05:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811136#M39961</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-02T21:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811199#M39969</link>
      <description>&lt;P&gt;I guess I don't know why you are subsetting your data, and then using PROC ANOVA to essentially just do a t test.&amp;nbsp; Your output from the first example should give a Tukey adjusted confidence interval for the difference between the levels of the variable 'leaf'.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a Tukey adjust p value for the difference, shift to PROC GLM, and replace "cldiff" with "pdiff" in the MEANS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&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>Tue, 03 May 2022 12:31:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811199#M39969</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2022-05-03T12:31:37Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811220#M39970</link>
      <description>Sorry, I'm Brazilian and my English is pessimistic. The variable used in class = left, in my database has 3 distinct groups: 1, 2 and 3. Using only proc anova: 
proc anova data=tab;
class leaf;
model lgd_m18=leaf;
run;

The results are for the three values. But I needed the results comparing sheet 1 with 2, 1 with 3, and 2 with 3, which I could only segregate the variable "left": 

data tab1 tab2 tab3;
set tabela1;
if leaf &amp;lt;= 2 then output tab1;
if 2 &amp;lt;= leaf &amp;lt;= 3 then output tab2;
if leaf = 1 or leaf = 3 then output tab3;
run;

proc anova data=tab1;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

proc anova data=tab2;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

proc anova data=tab3;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

proc anova data=tabela1;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

I wanted to know if I can get this last result using some option in proc anova, since sometimes my variable class can have 10 groups, for example, and then it becomes more difficult to segregate.</description>
      <pubDate>Tue, 03 May 2022 13:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811220#M39970</guid>
      <dc:creator>Thalitacosta</dc:creator>
      <dc:date>2022-05-03T13:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811222#M39971</link>
      <description>Sorry, I'm Brazilian and my English is pessimistic. The variable used in class = left, in my database has 3 distinct groups: 1, 2 and 3. Using only proc anova: 

proc anova data=tab;
class leaf;
model lgd_m18=leaf;
run;

The results are for the three values. But I needed the results comparing sheet 1 with 2, 1 with 3, and 2 with 3, which I could only segregate the variable "left": 

data tab1 tab2 tab3;
set tabela1;
if leaf &amp;lt;= 2 then output tab1;
if 2 &amp;lt;= leaf &amp;lt;= 3 then output tab2;
if leaf = 1 or leaf = 3 then output tab3;
run;

proc anova data=tab1;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

proc anova data=tab2;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

proc anova data=tab3;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

proc anova data=tabela1;
class leaf;
model lgd_m18=leaf;
means leaf/tukey cldiff;
run;

I wanted to know if I can get this last result using some option in proc anova, since sometimes my variable class can have 10 groups, for example, and then it becomes more difficult to segregate.</description>
      <pubDate>Tue, 03 May 2022 13:58:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811222#M39971</guid>
      <dc:creator>Thalitacosta</dc:creator>
      <dc:date>2022-05-03T13:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811223#M39972</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;But I needed the results comparing sheet 1 with 2, 1 with 3, and 2 with 3&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;This is one run of PROC GLM, where you ask GLM to provide pairwise comparisons of the means of each level. (Or even one run of PROC ANOVA)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811223#M39972</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-03T14:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811227#M39973</link>
      <description>Thanks, I will try to use glm&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 May 2022 14:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811227#M39973</guid>
      <dc:creator>Thalitacosta</dc:creator>
      <dc:date>2022-05-03T14:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: proc anova</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811229#M39974</link>
      <description>&lt;P&gt;The MEANS statement in GLM or ANOVA will do this for you, without subsetting the input data&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, this is why you should explain the big picture of what you are doing in your original question, instead of implying this is some sort of programming issue with bare minimum explanation. But once you clearly told us "&lt;SPAN&gt;But I needed the results comparing sheet 1 with 2, 1 with 3, and 2 with 3", everything becomes clear and it's not a programming issue. So please give us the big picture from now on.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 14:15:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-anova/m-p/811229#M39974</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-03T14:15:19Z</dc:date>
    </item>
  </channel>
</rss>

