<?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: LSMEANS / LINES option in PROC GLM? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/467068#M24288</link>
    <description>&lt;P&gt;If you have only basic SAS knowledge and you want to compare GLM to MIXED for mixed models, then you &lt;EM&gt;really, really&lt;/EM&gt; need to read&amp;nbsp;&lt;A href="https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/prodBK_59882_en.html" target="_self" rel="nofollow noopener noreferrer"&gt;SAS® for Mixed Models, Second Edition&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;GLM is a &lt;EM&gt;bad&lt;/EM&gt; choice for mixed models because some of what it reports is incorrect. And there are &lt;EM&gt;good&lt;/EM&gt; alternatives (MIXED and GLIMMIX, for example). The book I link to above covers in detail the problems that GLM has with mixed models, as well as the comparison of GLM to MIXED.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: If you use your favorite search engine to look for "glm versus mixed in sas", you'll find several papers that address the comparison.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 02:33:11 GMT</pubDate>
    <dc:creator>sld</dc:creator>
    <dc:date>2018-06-04T02:33:11Z</dc:date>
    <item>
      <title>LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466577#M24272</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sas.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/20913iEAF21755292CD461/image-size/large?v=v2&amp;amp;px=999" role="button" title="sas.jpg" alt="sas.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;al intentar correr estos datos me salen los siguientes errores. he intentado cambiar el comando pero no salen los datos que quiero.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 01:10:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466577#M24272</guid>
      <dc:creator>jescam05</dc:creator>
      <dc:date>2018-06-01T01:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466729#M24277</link>
      <description>&lt;P&gt;I regret that I do not read (or speak) Spanish, so I may be answering the wrong question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try adding "PDIFF=ALL" as an option to the LSMEANS statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 03:50:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466729#M24277</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-01T03:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466907#M24282</link>
      <description>&lt;P&gt;Thanks to try to help me. I run the command according to your observation and the error continue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now is a error 180-322.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I write the command&amp;nbsp; that I want to analize, and the error is in the sentence "&lt;SPAN&gt;LSMEANS PCH PG*PCH/ADJUST=tukey &lt;STRONG&gt;LINES&lt;/STRONG&gt;;&lt;/SPAN&gt;" inclusive in lines with errors 22-200, 22-322 and 200-322.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data&lt;/STRONG&gt; peso tallo;&lt;/P&gt;&lt;P&gt;DO PG=&lt;STRONG&gt;1&lt;/STRONG&gt; to &lt;STRONG&gt;2&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;DO PCH= &lt;STRONG&gt;1&lt;/STRONG&gt; to &lt;STRONG&gt;4&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;DO BLOQ=&lt;STRONG&gt;1&lt;/STRONG&gt; to &lt;STRONG&gt;4&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;INPUT Y@@;&lt;/P&gt;&lt;P&gt;COMPGPCH= PG*&lt;STRONG&gt;10&lt;/STRONG&gt;+PCH;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;DATALINES;&lt;/P&gt;&lt;P&gt;0.91&amp;nbsp; 1.13&amp;nbsp; 1.18&amp;nbsp; 0.88&lt;/P&gt;&lt;P&gt;1.52&amp;nbsp; 1.36&amp;nbsp; 1.87&amp;nbsp; 1.31&lt;/P&gt;&lt;P&gt;1.07&amp;nbsp; 1.18&amp;nbsp; 1.26&amp;nbsp; 1.65&lt;/P&gt;&lt;P&gt;0.68&amp;nbsp; 0.62&amp;nbsp; 0.81&amp;nbsp; 0.70&lt;/P&gt;&lt;P&gt;0.81&amp;nbsp; 0.72&amp;nbsp; 0.79&amp;nbsp; 0.74&lt;/P&gt;&lt;P&gt;1.23&amp;nbsp; 0.90&amp;nbsp; 0.90&amp;nbsp; 1.07&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.57&amp;nbsp; 1.96&amp;nbsp; 1.38&lt;/P&gt;&lt;P&gt;0.67&amp;nbsp; 0.71&amp;nbsp; 0.63&amp;nbsp; 0.66&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;PROC&lt;/STRONG&gt; &lt;STRONG&gt;GLM&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;CLASS PG PCH BLOQ;&lt;/P&gt;&lt;P&gt;MODEL Y= PG BLOQ(PG) PCH PG*PCH;&lt;/P&gt;&lt;P&gt;TEST H= PG E= BLOQ(PG);&lt;/P&gt;&lt;P&gt;MEANS PG/tukey E= BLOQ(PG);&lt;/P&gt;&lt;P&gt;LSMEANS PCH PG*PCH/ADJUST=tukey LINES;&lt;/P&gt;&lt;P&gt;output out=new p=yhat r=resid;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RUN&lt;/STRONG&gt;;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 16:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466907#M24282</guid>
      <dc:creator>jescam05</dc:creator>
      <dc:date>2018-06-01T16:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466921#M24283</link>
      <description>&lt;P&gt;Your code runs without error for me, but I am using the most recent version of SAS/STAT (9.4 TS1M5). The addition of the LINES option to the GLM procedure&amp;nbsp;happened in the most recent version (&lt;A href="https://blogs.sas.com/content/iml/2017/10/16/multiple-comparisons-lines-plot.html" target="_self"&gt;https://blogs.sas.com/content/iml/2017/10/16/multiple-comparisons-lines-plot.html&lt;/A&gt;). So if you are running an older version, that option is not available and that's why are are getting the error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, you are fitting a mixed model, and you'll want to switch to MIXED or GLIMMIX, which have had the LINES option for awhile. You should not use GLM to fit a mixed model, for a variety of reasons. A good resource for learning why and more is&amp;nbsp;&lt;A href="https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/prodBK_59882_en.html" target="_self"&gt;SAS® for Mixed Models, Second Edition&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding your code: in your data step, you are creating &lt;EM&gt;two identical&lt;/EM&gt; datasets: peso and tallo. I doubt that's your intention.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example of your model using GLIMMIX&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data peso tallo;
DO PG=1 to 2;
DO PCH= 1 to 4;
DO BLOQ=1 to 4;
INPUT Y@@;
COMPGPCH= PG*10+PCH;
output;
end;
end;
end;
DATALINES;
0.91  1.13  1.18  0.88
1.52  1.36  1.87  1.31
1.07  1.18  1.26  1.65
0.68  0.62  0.81  0.70
0.81  0.72  0.79  0.74
1.23  0.90  0.90  1.07
.     1.57  1.96  1.38
0.67  0.71  0.63  0.66
;
PROC GLM;
CLASS PG PCH BLOQ;
MODEL Y= PG BLOQ(PG) PCH PG*PCH;
TEST H= PG E= BLOQ(PG);
MEANS PG/tukey E= BLOQ(PG);
LSMEANS PCH PG*PCH/ADJUST=tukey LINES;
output out=new p=yhat r=resid;
RUN; 

proc glimmix data=peso;
    class pg pch bloq;
    model y = pg pch pg*pch;
    random bloq(pg);
    lsmeans pg pch / adjust=tukey lines;
    lsmeans pg*pch / plot=meanplot(sliceby=pg join cl) slice=pch;
    run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 16:37:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466921#M24283</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-01T16:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466945#M24284</link>
      <description>&lt;P&gt;I think that the problem is my SAS´ version (SAS system for windows 9.0), I tried to run to your commmand an appear me&amp;nbsp;ERROR: GLIMMIX procedure not found.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I interest to compare the pro glm and mixed, but a I confess that my knowledge in SAS are basics.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 17:29:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466945#M24284</guid>
      <dc:creator>jescam05</dc:creator>
      <dc:date>2018-06-01T17:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466947#M24285</link>
      <description>&lt;P&gt;SAS 9.0 dates back to 2002 or so--it's &lt;EM&gt;really&lt;/EM&gt; outdated. If you want to use SAS, you should install the most recent version, which is probably&amp;nbsp;free under the terms of your current SAS license.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc MIXED &lt;EM&gt;might&lt;/EM&gt;&amp;nbsp;do what you need, but you really ought to upgrade.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 17:38:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/466947#M24285</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-01T17:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/467055#M24287</link>
      <description>&lt;P&gt;I want to compare proc mixed split plot with glm procedure, in similar dates.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2018 23:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/467055#M24287</guid>
      <dc:creator>jescam05</dc:creator>
      <dc:date>2018-06-01T23:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: LSMEANS / LINES option in PROC GLM?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/467068#M24288</link>
      <description>&lt;P&gt;If you have only basic SAS knowledge and you want to compare GLM to MIXED for mixed models, then you &lt;EM&gt;really, really&lt;/EM&gt; need to read&amp;nbsp;&lt;A href="https://www.sas.com/store/books/categories/usage-and-reference/sas-for-mixed-models-second-edition/prodBK_59882_en.html" target="_self" rel="nofollow noopener noreferrer"&gt;SAS® for Mixed Models, Second Edition&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;GLM is a &lt;EM&gt;bad&lt;/EM&gt; choice for mixed models because some of what it reports is incorrect. And there are &lt;EM&gt;good&lt;/EM&gt; alternatives (MIXED and GLIMMIX, for example). The book I link to above covers in detail the problems that GLM has with mixed models, as well as the comparison of GLM to MIXED.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: If you use your favorite search engine to look for "glm versus mixed in sas", you'll find several papers that address the comparison.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 02:33:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/LSMEANS-LINES-option-in-PROC-GLM/m-p/467068#M24288</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-06-04T02:33:11Z</dc:date>
    </item>
  </channel>
</rss>

