<?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: Covariates in Proc GLIMMIX and Lsmeans in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515686#M26324</link>
    <description>&lt;P&gt;I think the full factorial is incomplete because each Main is not measured in each year, and there are only two reps (Main) for each ROT x TILL combination. So I'd look at&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data = &amp;lt;&amp;gt;;
  class rot till year;
  table rot*till, year;
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = &amp;lt;&amp;gt;;
  tables roc*till*year;
  run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 23 Nov 2018 23:41:59 GMT</pubDate>
    <dc:creator>sld</dc:creator>
    <dc:date>2018-11-23T23:41:59Z</dc:date>
    <item>
      <title>Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515602#M26315</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using SAS 9.4 and trying to include covariates in my analysis. See my code below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My response variable is NO3, my treatment is rot, my subplot is till, and there are repeated measures. I have two covariates I would like to add to the model, &lt;STRONG&gt;GDD&lt;/STRONG&gt; and &lt;STRONG&gt;date&lt;/STRONG&gt;. When I add one of these covaraites to the model statement, I get the following error.&lt;/P&gt;&lt;P&gt;"ERROR: LINES display is not produced for the year effect because p-values are not available for all least-squares means differences."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc glimmix;&lt;BR /&gt;class rot main till year rep;&lt;BR /&gt;model NO3=rot|till|year &lt;STRONG&gt;date&lt;/STRONG&gt;/ddfm=kr;&lt;BR /&gt;random int Main(rot)/subject=rep;&lt;BR /&gt;Random year/residual subject=main(rep*rot*till) type=cs;&lt;BR /&gt;lsmeans rot|till year/pdiff=all lines;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;What are some potential causes of this error? Am I entering the &lt;SPAN&gt;covariates&lt;/SPAN&gt; in the model correctly?&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515602#M26315</guid>
      <dc:creator>CalebN</dc:creator>
      <dc:date>2018-11-23T16:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515607#M26316</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/190522"&gt;@CalebN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am using SAS 9.4 and trying to include covariates in my analysis. See my code below.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My response variable is NO3, my treatment is rot, my subplot is till, and there are repeated measures. I have two covariates I would like to add to the model, &lt;STRONG&gt;GDD&lt;/STRONG&gt; and &lt;STRONG&gt;date&lt;/STRONG&gt;. When I add one of these covaraites to the model statement, I get the following error.&lt;/P&gt;
&lt;P&gt;"ERROR: LINES display is not produced for the year effect because p-values are not available for all least-squares means differences."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc glimmix;&lt;BR /&gt;class rot main till year rep;&lt;BR /&gt;model NO3=rot|till|year &lt;STRONG&gt;date&lt;/STRONG&gt;/ddfm=kr;&lt;BR /&gt;random int Main(rot)/subject=rep;&lt;BR /&gt;Random year/residual subject=main(rep*rot*till) type=cs;&lt;BR /&gt;lsmeans rot|till year/pdiff=all lines;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;What are some potential causes of this error? Am I entering the &lt;SPAN&gt;covariates&lt;/SPAN&gt; in the model correctly?&lt;/P&gt;
&lt;P&gt;Thanks for your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You did not show us how you are entering the covariates in the model. Show us that code. Click on the running man icon and paste your code into that window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem with LSMEANS is that it often fails if you don't have in your data all possible combinations of ROT and TILL and your covariates if they are in the LSMEANS statement. Also, show us a PROC FREQ or other analysis of ROT and TILL and covariates so that we can see there is actually data for all possible combinations of ROT and TILL and covariates (do NOT simply tell us that you have all possible combinations of ROT and TILL and covariates).&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 16:46:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515607#M26316</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-23T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515623#M26317</link>
      <description>&lt;P&gt;Hello Paige,&lt;/P&gt;&lt;P&gt;I am just putting the covaraites in the model statement. I'm not sure if that's correct or not though. I had bolded date which is all I have done to include that covariate. When date or GDD is not included in this code, I get all my lsmeans correctly. I included the output of&amp;nbsp; Proc Freq for ROT, TILL, GDD, and DATE. DATE has some which have higher frequency because the date was the same for two years.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25143i7D6A6452F397AE90/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25144i1A5037E66DA3E72D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25145i81D37F0E41897811/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix;
*output out=second;
class rot main till year rep;
model NO3=rot|till|year &lt;STRONG&gt;date&lt;/STRONG&gt;/ddfm=kr;
random int Main(rot)/subject=rep;
Random year/residual subject=main(rep*rot*till) type=cs;
lsmeans rot|till year/pdiff=all lines;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 17:08:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515623#M26317</guid>
      <dc:creator>CalebN</dc:creator>
      <dc:date>2018-11-23T17:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515660#M26319</link>
      <description>&lt;P&gt;If your design is a "standard" two-way factorial in a split-plot design, with whole plots in blocks and with repeated measures, then your use of &lt;EM&gt;main&lt;/EM&gt; in your code looks odd to me. Your problem with including a covariate may be a problem with your basic model specification, and not necessarily with the covariate addition. (Although I'm also a bit suspicious about the role of &lt;EM&gt;date&lt;/EM&gt; when &lt;EM&gt;year&lt;/EM&gt; is in the model.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=&amp;lt;something&amp;gt;;
  class rot till year rep;
  model NO3=rot|till|year / ddfm=kr;
  random int rot / subject=rep;
  random year / residual subject=rep*rot*till type=&amp;lt;something&amp;gt;;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;be more correct for your basic model? (Note that &lt;EM&gt;rep*rot&lt;/EM&gt;&amp;nbsp;-- as implemented in the first random statement --&amp;nbsp;is an alternative way to identify a specific whole plot, which you might be calling &lt;EM&gt;main&lt;/EM&gt;.&amp;nbsp;Knowing which &lt;EM&gt;rep&lt;/EM&gt; and which level of &lt;EM&gt;rot&lt;/EM&gt;, one can uniquely identify which whole plot.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: How a covariate is incorporated in the statistical model depends on the experimental/sampling unit on which the covariate is measured. The covariate could be measured at the whole plot level, or at the subplot level, etc. You're more likely to get better input from the Community if you provide more information about your experimental design. For example, I'm guessing that &lt;EM&gt;date&lt;/EM&gt; (and &lt;EM&gt;gdd&lt;/EM&gt;) are repeated measures made within each year; if so, then when you add &lt;EM&gt;date&lt;/EM&gt;, you need to modify the random statements accordingly. You might find&amp;nbsp;&lt;A href="https://www.crcpress.com/Analysis-of-Messy-Data-Volume-III-Analysis-of-Covariance/Milliken-Johnson/p/book/9781584880837" target="_self"&gt;Analysis of Messy Data, Volume III: Analysis of Covariance&lt;/A&gt;&amp;nbsp;to be useful in sorting this out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit 2: Looking at the tables you posted, it appears that one value of &lt;EM&gt;date&lt;/EM&gt;&amp;nbsp;(or &lt;EM&gt;gdd&lt;/EM&gt;) is paired with one value of &lt;EM&gt;year&lt;/EM&gt;. If that is true, then you cannot have both &lt;EM&gt;date&lt;/EM&gt; and &lt;EM&gt;year&lt;/EM&gt; in the same model--&lt;EM&gt;date&lt;/EM&gt; and &lt;EM&gt;year&lt;/EM&gt; are redundant, and the model will be overspecified. You have to pick one or the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the future, posting table images is not ideal. Instead, save output to a file, e.g., PDF (not Word) using ODS OUTPUT, and attach the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 21:05:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515660#M26319</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-11-23T21:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515663#M26320</link>
      <description>&lt;P&gt;Maybe I'm not understanding you, or you are not understanding me, but you first talk about putting the covariate GDD into the model, I ask to see the code, and you don't show me the code that has GDD in the model.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's really hard to advise without seeing exactly what you are doing.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 21:05:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515663#M26320</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-23T21:05:58Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515675#M26321</link>
      <description>&lt;P&gt;Sorry, I think I understand what you were saying now. I would like to use either date, or GDD as my covariate, whichever explains more variation. So the code I've tried is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix;
class rot main till year rep;
model NO3=rot|till|year &lt;STRONG&gt;GDD&lt;/STRONG&gt;/ddfm=kr;
random int Main(rot)/subject=rep;
Random year/residual subject=main(rep*rot*till) type=cs;
lsmeans rot|till year/pdiff=all lines;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix;
class rot main till year rep;
model NO3=rot|till|year&lt;STRONG&gt; date&lt;/STRONG&gt;/ddfm=kr;
random int Main(rot)/subject=rep;
Random year/residual subject=main(rep*rot*till) type=cs;
lsmeans rot|till year/pdiff=all lines;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here's a bit more detail on my experimental design since I don't think I was specific enough. Soil NO3 samples were taken from each "MAIN" every four years and there are 2 "MAIN" for each ROT and TILL which are offset by 2 years in a 4 year crop rotation (ROT). This means every 2 years there is a measure of NO3 in every ROT and TILL but the repeated measure is only in every MAIN.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NO3 is in theory supposed to be measured at the same time each year, but is sometimes a bit earlier or later depending on field conditions. DATE is the Julian date of NO3 sampling and GDD is an accumulation of temperature that year up until the sample date. All NO3 values have the same DATE and GDD value for each year. I suspect higher DATE and GDD will result in higher NO3 and would like to account for this using one of these 2 variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this is more clear.&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 22:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515675#M26321</guid>
      <dc:creator>CalebN</dc:creator>
      <dc:date>2018-11-23T22:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515676#M26322</link>
      <description>&lt;P&gt;I appreciate the additional information, but there still is not enough detail to identify a statistical model that is consistent with your experiment. Plus crop rotation studies are complicated regardless.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I find that it is extraordinarily useful to distinguish between design components and treatment components in an experimental design. Using your favorite search engine, search on "design structure and treatment structure"; there are several useful hits. You are currently co-mingling the two concepts. For example, you do not take samples from "each ROT and TILL" (of which there appear to be 7 x 2 = 14 combinations); instead you take samples from the &lt;EM&gt;experimental units&lt;/EM&gt; assigned to levels of ROT and TILL, of which there are 14 x however many replications.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may have statistical support available at your institution, perhaps even within the agricultural academic unit. If so, you would likely find it invaluable to work across a table rather than across the internet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 22:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515676#M26322</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-11-23T22:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515682#M26323</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/190522"&gt;@CalebN&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;So the code I've tried is&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;lsmeans rot|till year/pdiff=all lines;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So once again, I will state that you need to be sure that you have all possible combinations of rot and till, otherwise you cannot get LSMEANS and you probably can't get the LINES option to work either. You have to demonstrate via PROC FREQ or similar that you have all possible combinations of these two variables. Judging from the screen captures, it is unlikely that you have met this condition, but I can't be sure so that is why I say that YOU need to demonstrate this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need to run PROC FREQ with the tables command&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;tables roc * till;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Nov 2018 23:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515682#M26323</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-11-23T23:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515686#M26324</link>
      <description>&lt;P&gt;I think the full factorial is incomplete because each Main is not measured in each year, and there are only two reps (Main) for each ROT x TILL combination. So I'd look at&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data = &amp;lt;&amp;gt;;
  class rot till year;
  table rot*till, year;
  run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data = &amp;lt;&amp;gt;;
  tables roc*till*year;
  run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 23 Nov 2018 23:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515686#M26324</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-11-23T23:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515725#M26328</link>
      <description>&lt;P&gt;Thanks for your help, I have some resources at my institution that might be able to help me further.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 16:16:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515725#M26328</guid>
      <dc:creator>CalebN</dc:creator>
      <dc:date>2018-11-24T16:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Covariates in Proc GLIMMIX and Lsmeans</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515735#M26329</link>
      <description>&lt;P&gt;One more bit of input:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are some analysis ideas for your study.&lt;/P&gt;
&lt;P&gt;1. Define two blocks (&lt;EM&gt;rep&lt;/EM&gt;), one for the main plots first measured in 1994 and a second for main plots first measured in 1995. Block variability will include both spatial and temporal sources. See link to Loughin paper below.&lt;/P&gt;
&lt;P&gt;2. Define a new variable (&lt;EM&gt;year_order&lt;/EM&gt;) that takes values 1 through 6 (1 for 1994 and 1995, 2 for 1996 and 1997, etc.) This will prevent problems due to an incomplete factorial.&lt;/P&gt;
&lt;P&gt;3. Fit a mixed model with &lt;EM&gt;year_order&lt;/EM&gt;, something like (untested, of course):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc glimmix data=&amp;lt;&amp;gt;;
  class rep rot till year_order;
  model y = rot | till | year_order / ddfm=kr2;
  random intercept rot / subject=rep;
  random year_order / subject=rep*rot*till type=&amp;lt;&amp;gt; residual;
  run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;4.&amp;nbsp; Replace &lt;EM&gt;year_order&lt;/EM&gt;&amp;nbsp;(which is categorical, hence ANOVA-like) in the statistical model with &lt;EM&gt;date&amp;nbsp;&lt;/EM&gt;(which is continuous, hence regression). As I mentioned previously, you will not have success including both &lt;EM&gt;year&lt;/EM&gt; and &lt;EM&gt;date&lt;/EM&gt;&amp;nbsp;as fixed effects factors in the same model because there is a one-to-one correspondence between these two variables; and besides, the point is to replace &lt;EM&gt;year&lt;/EM&gt; with something more mechanistically informative. As you work through this analysis, you can now consider (1) whether the relationship between &lt;EM&gt;y&lt;/EM&gt; and &lt;EM&gt;date&lt;/EM&gt; is linear; (2) whether and how to center the covariate (you'll want to center the covariate, but you'll have to decide which value to center on; see link to paper below); (3) whether to incorporate random slopes; (4) whether to incorporate autocorrelation among the repeated measurements within each subplot; (5) and probably other stuff that pops up during the process (e.g., distributional assumptions, variance estimation problems). Hopefully you are now a bit apprehensive about the complexity of this process, and that's good. It is complicated, and that's why a good stat consultant is so valuable. This is not a do-it-yourself project for most people who do not have extensive stat experience.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll find design insight in this paper by Tom Loughin&amp;nbsp;&lt;A href="https://dl.sciencesocieties.org/publications/cs/abstracts/46/6/2492" target="_self"&gt;Improved Experimental Design and Analysis for Long-Term Experiments&lt;/A&gt;. His setup is not exactly like yours (it has observations on each experimental unit in each year), but you'll find concepts and parallels for your study.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For random slopes and centering, particularly centering on values other than the overall mean, this paper is good&amp;nbsp;&lt;A href="http://psycnet.apa.org/record/2009-02286-025" target="_self"&gt;A simple method for distinguishing within- versus between-subject effects using mixed models&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope your on-campus resources work out for you. Good luck, and enjoy the process!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Nov 2018 18:46:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Covariates-in-Proc-GLIMMIX-and-Lsmeans/m-p/515735#M26329</guid>
      <dc:creator>sld</dc:creator>
      <dc:date>2018-11-24T18:46:11Z</dc:date>
    </item>
  </channel>
</rss>

