<?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: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641165#M78313</link>
    <description>&lt;P&gt;I'm thinking you should put the &lt;FONT face="courier new,courier"&gt;Year*Cape&lt;/FONT&gt; after the &lt;FONT face="courier new,courier"&gt;"2016 CB x 2017 CB"&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 19 Apr 2020 21:35:25 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-04-19T21:35:25Z</dc:date>
    <item>
      <title>How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641106#M78305</link>
      <description>&lt;P&gt;I am trying to specify several pre-planned comparisons for my PROC MIXED model and using a Bonneferoni adjustment for these comparisons instead of comparing every possible combination using Tukey.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The SAS literature says:&lt;/P&gt;&lt;P&gt;"You can specify multiple effects in one LSMEANS statement or in multiple LSMEANS statements, and all LSMEANS statements must appear after the MODEL statement"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I specifically list the individual comparisons under one LSMEANS statement and have them be adjusted together as one unit?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
PROC MIXED DATA = WORK.Data_Final_noAugust_SS plots(MAXPOINTS=none)=all method=REML;
	CLASS Year Month Cape Site Transect Quadrat;
	MODEL 'Percent.Cover'n = Month Year|Cape/SOLUTION ddfm = KR CL ALPHA=0.05 INTERCEPT outpred=Smooth;
   RANDOM Quadrat(Transect) Transect(Site) Site(Cape) /CL ALPHA=0.05 TYPE=VC;
    LSMEANS Year|Cape / PDIFF CL ALPHA=0.05 ADJUST=TUKEY;
RUN;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Year*Cape compares every single combination of Cape (three levels: CF, CP, CB) and Year (three levels: 2016, 2017, 2018). I do not want that; instead, I want specific comparisons with the Bonneferoni adjustment:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;CB 2016 vs CB 2017&lt;/P&gt;&lt;P&gt;CB 2017 vs CB 2018&lt;/P&gt;&lt;P&gt;CF 2016 vs CB 2016&lt;/P&gt;&lt;P&gt;CP 2016 vs CB 2016&lt;/P&gt;&lt;P&gt;2016 vs 2017&lt;/P&gt;&lt;P&gt;2017 vs 2018&lt;/P&gt;&lt;P&gt;CF vs CB&lt;/P&gt;&lt;P&gt;CF vs CP&lt;/P&gt;&lt;P&gt;CB vs CP&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I write that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 15:37:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641106#M78305</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T15:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641113#M78306</link>
      <description>&lt;P&gt;You would use the LSMESTIMATE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As it says here in &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect047.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_self"&gt;the documentation&lt;/A&gt;, "Because the analytic features and capabilities of the LSMESTIMATE statement are an amalgam of the &lt;A tabindex="0" href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect039.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" data-docset-id="statug" data-docset-version="14.3" data-original-href="statug_introcom_sect039.htm"&gt;LSMEANS&lt;/A&gt; and the &lt;A tabindex="0" href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect033.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" data-docset-id="statug" data-docset-version="14.3" data-original-href="statug_introcom_sect033.htm"&gt;ESTIMATE&lt;/A&gt; statement, the syntax of the statement follows the same pattern."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if you click on the ESTIMATE statement documentation, you will find examples of estimates of several different comparisons in one statement, and then you can use ADJUST=BON.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 17:13:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641113#M78306</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-19T17:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641127#M78307</link>
      <description>&lt;P&gt;Thank you for the documentation. I read it and I am having difficulty understanding how to write the code exactly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics on;
PROC MIXED DATA = WORK.Data_Final_noAugust_SS plots(MAXPOINTS=none)=all method=REML;
	CLASS Year Month Cape Site Transect Quadrat;
	MODEL 'Percent.Cover'n = Month Year|Cape/SOLUTION ddfm = KR CL ALPHA=0.05 INTERCEPT outpred=Smooth;
   RANDOM Quadrat(Transect) Transect(Site) Site(Cape) /CL ALPHA=0.05 TYPE=VC;
    LSMESTIMATE Year*Cape "2016 CB x 2017 CB"
							[1,1,2]
							[-1,1,1],
						  "2017 CB x 2018 CB"
							[1,2,3]
							[-1,1,1]/ ADJUST=BON;
RUN;
ods graphics off;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I keep getting error messages. For this particular code, I get this for the brackets:&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, +, -, ].&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 18:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641127#M78307</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T18:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641128#M78308</link>
      <description>&lt;P&gt;Show us the LOG of this PROC MIXED, all of it, the code and the ERROR and WARNING messages, do not chop anything out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please preserve the formatting of the log by pasting the log from the SAS log window (as text) into the window that appears when you click on the &amp;lt;/&amp;gt; icon. This makes the log much more readable and interpretable. DO NOT SKIP THIS STEP. If you skip this step, we will simply repeat the request to perform this step.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 18:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641128#M78308</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-19T18:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641129#M78309</link>
      <description>&lt;P&gt;Here's the log:&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                               07:33 Sunday, April 19, 2020

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='SS_Transects';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='\\Mac\Home\Desktop\ElNinoKelpTransect.egp';
6          %LET _CLIENTPROJECTPATHHOST='BARBARASPIEAEBF';
7          %LET _CLIENTPROJECTNAME='ElNinoKelpTransect.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HtmlBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&amp;amp;sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         ods graphics on;


27         PROC MIXED DATA = WORK.Data_Final_noAugust_SS plots(MAXPOINTS=none)=all method=REML;
28         	CLASS Year Month Cape Site Transect Quadrat;
29         	MODEL 'Percent.Cover'n = Month Year|Cape/SOLUTION ddfm = KR CL ALPHA=0.05 INTERCEPT outpred=Smooth;
30            RANDOM Quadrat(Transect) Transect(Site) Site(Cape) /CL ALPHA=0.05 TYPE=VC;
31             LSMESTIMATE Year*Cape "2016 CB x 2017 CB"
NOTE: PROCEDURE MIXED used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SMOOTH may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.SMOOTH was not replaced because this step was stopped.
32         							[1,1,2]
                      _
                      22
                      200
33         							[-1,1,1],
                       _
                       22
                       200
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, +, -, ].  
ERROR 200-322: The symbol is not recognized and will be ignored.
34         						  "2017 CB x 2018 CB"
35         							[1,2,3]
                      _
                      22
                      200
36         							[-1,1,1]/ ADJUST=BON;
                       _
2                                                          The SAS System                               07:33 Sunday, April 19, 2020

                       22
                       200
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, +, -, ].  
ERROR 200-322: The symbol is not recognized and will be ignored.
37         RUN;
38         ods graphics off;
39         
40         GOPTIONS NOACCESSIBLE;
41         %LET _CLIENTTASKLABEL=;
42         %LET _CLIENTPROCESSFLOWNAME=;
43         %LET _CLIENTPROJECTPATH=;
44         %LET _CLIENTPROJECTPATHHOST=;
45         %LET _CLIENTPROJECTNAME=;
46         %LET _SASPROGRAMFILE=;
47         %LET _SASPROGRAMFILEHOST=;
48         
49         ;*';*";*/;quit;run;
50         ODS _ALL_ CLOSE;
51         
52         
53         QUIT; RUN;
54         &lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Apr 2020 18:22:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641129#M78309</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T18:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641165#M78313</link>
      <description>&lt;P&gt;I'm thinking you should put the &lt;FONT face="courier new,courier"&gt;Year*Cape&lt;/FONT&gt; after the &lt;FONT face="courier new,courier"&gt;"2016 CB x 2017 CB"&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 21:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641165#M78313</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-19T21:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641166#M78314</link>
      <description>&lt;P&gt;It adds another error when I put Year*Cape after the text with quotation marks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                               07:33 Sunday, April 19, 2020

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='SS_Transects';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='\\Mac\Home\Desktop\ElNinoKelpTransect.egp';
6          %LET _CLIENTPROJECTPATHHOST='BARBARASPIEAEBF';
7          %LET _CLIENTPROJECTNAME='ElNinoKelpTransect.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HtmlBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&amp;amp;sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         ods graphics on;


27         PROC MIXED DATA = WORK.Data_Final_noAugust_SS plots(MAXPOINTS=none)=all method=REML;
28         	CLASS Year Month Cape Site Transect Quadrat;
29         	MODEL 'Percent.Cover'n = Month Year|Cape/SOLUTION ddfm = KR CL ALPHA=0.05 INTERCEPT outpred=Smooth;
30            RANDOM Quadrat(Transect) Transect(Site) Site(Cape) /CL ALPHA=0.05 TYPE=VC;
31             LSMESTIMATE "2016 CB x 2017 CB" Year*Cape
                           ___________________
                           22
                           200
NOTE: PROCEDURE MIXED used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SMOOTH may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.SMOOTH was not replaced because this step was stopped.
ERROR 22-322: Expecting a name.  
ERROR 200-322: The symbol is not recognized and will be ignored.
32         							[1,1,2]
                      _
                      22
                      200
33         							[-1,1,1],
                       _
                       22
                       200
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, +, -, ].  
ERROR 200-322: The symbol is not recognized and will be ignored.
34         						  "2017 CB x 2018 CB"
35         							[1,2,3]
2                                                          The SAS System                               07:33 Sunday, April 19, 2020

                      _
                      22
                      200
36         							[-1,1,1]/ ADJUST=BON;
                       _
                       22
                       200
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, +, -, ].  
ERROR 200-322: The symbol is not recognized and will be ignored.
37         RUN;
38         ods graphics off;
39         
40         GOPTIONS NOACCESSIBLE;
41         %LET _CLIENTTASKLABEL=;
42         %LET _CLIENTPROCESSFLOWNAME=;
43         %LET _CLIENTPROJECTPATH=;
44         %LET _CLIENTPROJECTPATHHOST=;
45         %LET _CLIENTPROJECTNAME=;
46         %LET _SASPROGRAMFILE=;
47         %LET _SASPROGRAMFILEHOST=;
48         
49         ;*';*";*/;quit;run;
50         ODS _ALL_ CLOSE;
51         
52         
53         QUIT; RUN;
54         &lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Apr 2020 21:39:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641166#M78314</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T21:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641167#M78315</link>
      <description>&lt;P&gt;The documentation seems to specify a single quote around the label, rather than a double quote. Please try that. (Although I have never known SAS to be picky about these things except when dealing with macros and macro variables, which is not the case here)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that's not it, the appearance of the ERROR message may indicate that you may have some special non-printing character rather than a space after the word LSMESTIMATE. What happens if you re-type the LSMESTIMATE command from scratch (and no copy and paste allowed)?&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 21:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641167#M78315</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-19T21:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641169#M78316</link>
      <description>&lt;P&gt;Seems like the single quote is not the issue here. I tried to re-write the code from scratch and compact them together in fewer lines. Here's the error message:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;1                                                          The SAS System                               07:33 Sunday, April 19, 2020

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='SS_Transects';
4          %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5          %LET _CLIENTPROJECTPATH='\\Mac\Home\Desktop\ElNinoKelpTransect.egp';
6          %LET _CLIENTPROJECTPATHHOST='BARBARASPIEAEBF';
7          %LET _CLIENTPROJECTNAME='ElNinoKelpTransect.egp';
8          %LET _SASPROGRAMFILE='';
9          %LET _SASPROGRAMFILEHOST='';
10         
11         ODS _ALL_ CLOSE;
12         OPTIONS DEV=PNG;
13         GOPTIONS XPIXELS=0 YPIXELS=0;
14         FILENAME EGSR TEMP;
15         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
16             STYLE=HtmlBlue
17             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/7.1/Styles/HtmlBlue.css")
18             NOGTITLE
19             NOGFOOTNOTE
20             GPATH=&amp;amp;sasworklocation
21             ENCODING=UTF8
22             options(rolap="on")
23         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
24         
25         GOPTIONS ACCESSIBLE;
26         ods graphics on;


27         PROC MIXED DATA = WORK.Data_Final_noAugust_SS plots(MAXPOINTS=none)=all method=REML;
28         	CLASS Year Month Cape Site Transect Quadrat;
NOTE: PROCEDURE MIXED used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.SMOOTH may be incomplete.  When this step was stopped there were 0 observations and 0 variables.
WARNING: Data set WORK.SMOOTH was not replaced because this step was stopped.
29         	MODEL 'Percent.Cover'n = Month Year|Cape/SOLUTION ddfm = KR CL ALPHA=0.05 INTERCEPT outpred=Smooth;
30            RANDOM Quadrat(Transect) Transect(Site) Site(Cape) /CL ALPHA=0.05 TYPE=VC;
31            LSMESTIMATE Year*Cape '2016 CB x 2017 CB'[1,1,2][-1,1,1],
                                                           _       _
                                                           22      22
                                                           200     200
32         						  '2017 CB x 2018 CB'[1,2,3][-1,1,1]/ ADJUST=BON;
                                          _       _
                                          22      22
                                          200     200
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, +, -, ].  
ERROR 200-322: The symbol is not recognized and will be ignored.
33         RUN;
34         ods graphics off;
35         
36         GOPTIONS NOACCESSIBLE;
37         %LET _CLIENTTASKLABEL=;
38         %LET _CLIENTPROCESSFLOWNAME=;
39         %LET _CLIENTPROJECTPATH=;
40         %LET _CLIENTPROJECTPATHHOST=;
2                                                          The SAS System                               07:33 Sunday, April 19, 2020

41         %LET _CLIENTPROJECTNAME=;
42         %LET _SASPROGRAMFILE=;
43         %LET _SASPROGRAMFILEHOST=;
44         
45         ;*';*";*/;quit;run;
46         ODS _ALL_ CLOSE;
47         
48         
49         QUIT; RUN;
50         &lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Apr 2020 21:58:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641169#M78316</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T21:58:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641171#M78317</link>
      <description>&lt;P&gt;How many levels of variable YEAR? How many levels of variable CAPE?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Does the code run if you remove the LSMESTIMATE statement?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 22:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641171#M78317</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-19T22:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641172#M78318</link>
      <description>&lt;P&gt;Cape has 3 levels (CF, CB and CP) and Year has 3 levels (2016, 2017, and 2018).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code runs fine without the LSMESTIMATE statement.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 22:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641172#M78318</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T22:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641173#M78319</link>
      <description>&lt;P&gt;Okay, I'm out of ideas. You might want to contact SAS Technical Support.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 22:14:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641173#M78319</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-19T22:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641174#M78320</link>
      <description>&lt;P&gt;Okay, thank you so much for your help! I will reach out to the technical support.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Apr 2020 22:15:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641174#M78320</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-19T22:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641199#M78325</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/278295"&gt;@vitaaquaticus&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't see any square brackets in the &lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect048.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;. &lt;STRIKE&gt;There should be no brackets at all around the "&lt;EM&gt;values&lt;/EM&gt;" part of the statement.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;Edit: Sorry, please see correction in subsequent post.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 11:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641199#M78325</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-04-20T11:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641253#M78326</link>
      <description>&lt;P&gt;Square brackets appear in an example here:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect034.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=statug&amp;amp;docsetTarget=statug_introcom_sect034.htm&amp;amp;docsetVersion=14.3&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have confirmed via a small PROC MIXED with LSMESTIMATE using SASHELP.CLASS that square brackets are not the problem.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 11:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641253#M78326</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-20T11:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641261#M78327</link>
      <description>&lt;P&gt;Ah, I see. Thanks, I hadn't dug deep enough in the documentation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In fact, it's the &lt;EM&gt;second comma&lt;/EM&gt; within the square brackets that SAS complains about. This conclusion is consistent with both the error message (including the underlines) and the syntax.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 11:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641261#M78327</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-04-20T11:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641269#M78328</link>
      <description>&lt;P&gt;I think that's the answer,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 11:49:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641269#M78328</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-04-20T11:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641312#M78330</link>
      <description>&lt;P&gt;Ah yes, these pesky little commas! Thank you so much!!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 14:08:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641312#M78330</guid>
      <dc:creator>vitaaquaticus</dc:creator>
      <dc:date>2020-04-20T14:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a LSMEANS statement with several pre-planned comparisons and adjustments for them?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641330#M78331</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/278295"&gt;@vitaaquaticus&lt;/a&gt;: You're welcome. But I think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;deserves the credit for the "Accepted Solution." It was his idea to suggest the LSMESTIMATE statement, so you may want to mark&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641113/highlight/true#M78306" target="_blank" rel="noopener"&gt;this post&lt;/A&gt;&amp;nbsp;as the solution after clicking &lt;SPAN&gt;"Not the Solution" in the option menu (see icon below) of the current solution.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="option_menu.png" style="width: 137px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38460iE6090EDC89369FD3/image-size/large?v=v2&amp;amp;px=999" role="button" title="option_menu.png" alt="option_menu.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Apr 2020 14:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-write-a-LSMEANS-statement-with-several-pre-planned/m-p/641330#M78331</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-04-20T14:50:17Z</dc:date>
    </item>
  </channel>
</rss>

