<?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: MIXED EFFECTS MODELING in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701217#M33832</link>
    <description>&lt;P&gt;Well, a 3 dimensional spatial analysis isn't really needed, as you have radial symmetry within each plot.&amp;nbsp; Using the information found&amp;nbsp;&lt;A href="https://stats.idre.ucla.edu/sas/faq/how-do-i-model-a-spatially-autocorrelated-outcome/" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;, I would try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=teaksggrowthrate;
class plot ;
model SG = plot / solution;
repeated  / subject= intercept type=sp(powa)(height rrd) /r rcorr;
lsmeans plot ;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want LSMEANS at various points on the rrd axis, you have to employ a bit of trickery.&amp;nbsp; First, create a variable in your dataset that is exactly equal to rrd.&amp;nbsp; For this example, I will call it rrd_continuous.&amp;nbsp; Then fit the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=teaksggrowthrate;
class plot  rrd;
model SG = plot rrd plot*rrd/ solution;
repeated rrd / subject= intercept type=sp(powa)(height rrd_continuous) /r rcorr;
lsmeans plot ;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The covariance type in both models is an anisotropic (not the same correlation in both dimensions) power relationship.&amp;nbsp; Other covariance types that might be appropriate would be anisotropic exponential [ SP(POWA)(height rrd_continuous) ] and 2D exponential, geometrically anisotropic [ SP(EXPGA)(height rrd_continuous).&amp;nbsp; You could select amongst these by selecting the model with the smallest AIC or corrected AIC. Short descriptions of these structures are found in the documentation under the REPEATED statement at the TYPE= section.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, be aware that the arguments to the spatial covariance structures MUST be continuous, and so should not appear in the CLASS statement, which is why you have to have rrd_continuous in the dataset for the second MIXED example.&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;</description>
    <pubDate>Tue, 24 Nov 2020 13:50:50 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2020-11-24T13:50:50Z</dc:date>
    <item>
      <title>MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/700657#M33797</link>
      <description>&lt;P&gt;I want to clarify the effect of growth rate on wood specific gravity.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Three trees were partitioned into two halves each with the central core as the reference (this is affected by the growth rate and consequently named it plot). Wood samples are collected at different height levels at 1m interval starting from 0.3m from ground level. Wood specific gravity is measured at relative radial interval (RRD) (0.1 to 1) standardizing the different radii and aligning them to the same age when wood was formed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume PLOT to be fixed factor, RDD as a covariate and Repeated variable, Height as Random factor and repeated subject Height(Plot).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote this procedure to execute the plan;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=teaksggrowthrate;&lt;BR /&gt;class plot rrd height;&lt;BR /&gt;model SG = plot rrd plot*rrd;&lt;BR /&gt;repeated rrd / subject= height (plot) r rcorr;&lt;BR /&gt;run;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Am I doing the right thing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Nov 2020 06:47:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/700657#M33797</guid>
      <dc:creator>JOADUTWUM</dc:creator>
      <dc:date>2020-11-21T06:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/700905#M33814</link>
      <description>&lt;P&gt;If you wish to treat height as a random effect (and estimate the variance component) you may wish to fit a random intercept model for height.&amp;nbsp; I would adapt your code to try the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=teaksggrowthrate;
class plot rrd height;
model SG = plot rrd plot*rrd;
random intercept/subject=height;
repeated rrd / subject= height (plot) r rcorr;
lsmeans plot rrd plot*rrd;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I also added an LSMEANS statement to get the marginal means (averaged over all instances of height).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a bit curious as to treating height as a random effect.&amp;nbsp; You may want to consider some sort of 3 dimensional spatial correlation for rrd and height, jointly.&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;</description>
      <pubDate>Mon, 23 Nov 2020 13:58:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/700905#M33814</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-23T13:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701112#M33826</link>
      <description>Dear Steve,&lt;BR /&gt;I also did random intercept model for height.&lt;BR /&gt;With height growth, wood is formed by the same cambium but in successive years.&lt;BR /&gt;PS: how do I implement the 3 dimensional spatial correlation for rrd and height?&lt;BR /&gt;Thank you.</description>
      <pubDate>Mon, 23 Nov 2020 23:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701112#M33826</guid>
      <dc:creator>JOADUTWUM</dc:creator>
      <dc:date>2020-11-23T23:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701217#M33832</link>
      <description>&lt;P&gt;Well, a 3 dimensional spatial analysis isn't really needed, as you have radial symmetry within each plot.&amp;nbsp; Using the information found&amp;nbsp;&lt;A href="https://stats.idre.ucla.edu/sas/faq/how-do-i-model-a-spatially-autocorrelated-outcome/" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;, I would try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=teaksggrowthrate;
class plot ;
model SG = plot / solution;
repeated  / subject= intercept type=sp(powa)(height rrd) /r rcorr;
lsmeans plot ;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want LSMEANS at various points on the rrd axis, you have to employ a bit of trickery.&amp;nbsp; First, create a variable in your dataset that is exactly equal to rrd.&amp;nbsp; For this example, I will call it rrd_continuous.&amp;nbsp; Then fit the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc mixed data=teaksggrowthrate;
class plot  rrd;
model SG = plot rrd plot*rrd/ solution;
repeated rrd / subject= intercept type=sp(powa)(height rrd_continuous) /r rcorr;
lsmeans plot ;
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The covariance type in both models is an anisotropic (not the same correlation in both dimensions) power relationship.&amp;nbsp; Other covariance types that might be appropriate would be anisotropic exponential [ SP(POWA)(height rrd_continuous) ] and 2D exponential, geometrically anisotropic [ SP(EXPGA)(height rrd_continuous).&amp;nbsp; You could select amongst these by selecting the model with the smallest AIC or corrected AIC. Short descriptions of these structures are found in the documentation under the REPEATED statement at the TYPE= section.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, be aware that the arguments to the spatial covariance structures MUST be continuous, and so should not appear in the CLASS statement, which is why you have to have rrd_continuous in the dataset for the second MIXED example.&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;</description>
      <pubDate>Tue, 24 Nov 2020 13:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701217#M33832</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-24T13:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701428#M33850</link>
      <description>&lt;P&gt;Dear Steve,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the support.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the first proc,&amp;nbsp; I got an error:&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasError"&gt;ERROR 22-322: Syntax error, expecting one of the following: ;, GROUP, HLM, HLPS, LDATA, LOCAL, LOCALVAR, LOCALW, NONLOCALW, R, RC,&lt;/DIV&gt;&lt;DIV class="sasError"&gt;RCI, RCORR, RI, SSCP, SUBJECT, TYPE.&lt;/DIV&gt;&lt;DIV class="sasError"&gt;ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/DIV&gt;</description>
      <pubDate>Wed, 25 Nov 2020 03:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701428#M33850</guid>
      <dc:creator>JOADUTWUM</dc:creator>
      <dc:date>2020-11-25T03:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701527#M33855</link>
      <description>&lt;P&gt;That error is my fault.&amp;nbsp; There are two slashes in the REPEATED statements.&amp;nbsp; Remove the second one and that should take care of the issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 13:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/701527#M33855</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2020-11-25T13:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/709838#M34368</link>
      <description>PROC MIXED DATA=sgonage INFO IC ASYCORR ASYCOV ;&lt;BR /&gt;CLASS TREE RADII AGE ;&lt;BR /&gt;MODEL PBSG = RADII AGE RADII*AGE / S CHISQ ;&lt;BR /&gt;REPEATED / TYPE = un SUBJECT = TREE(RADII) R RCORR ;&lt;BR /&gt;RUN;&lt;BR /&gt;&lt;BR /&gt;The statements above could not make Hessian positive definite.&lt;BR /&gt;&lt;BR /&gt;Any help?&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
      <pubDate>Thu, 07 Jan 2021 07:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/709838#M34368</guid>
      <dc:creator>JOADUTWUM</dc:creator>
      <dc:date>2021-01-07T07:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/709888#M34370</link>
      <description>&lt;P&gt;The most likely reason is that you do not have enough data to fit a fully unstructured covariance model.&amp;nbsp; For instance, 6 levels of AGE requires fitting 21 parameters, and at a rule of thumb of at least 10 obs per parameter, you would need around 210 observations.&amp;nbsp; You'll likely have to find a more parsimonious covariance structure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you change the REPEATED statement to something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;REPEATED AGE/ TYPE = csh SUBJECT = TREE(RADII) R RCORR ;&lt;/PRE&gt;
&lt;P&gt;to see if that avoided the problem, it would be a start.&amp;nbsp; Time series related structures- AR(1), ARH(1), ANTE(1)-are good choices for observations equally spaced in time.&amp;nbsp; For unequally spaced in time observations, a spatial power structure has worked for us in the past.&amp;nbsp; You can select among the various choices by selecting the one with the smallest AIC or AICC among those that converge and don't have the Hessian issue.&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;</description>
      <pubDate>Thu, 07 Jan 2021 12:35:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/709888#M34370</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-01-07T12:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/720121#M34856</link>
      <description>&lt;P&gt;Good day Steve Denham ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I trust this message finds you well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question regarding doubly repeated measures.&lt;/P&gt;&lt;P&gt;I used &lt;A href="mailto:UN@AR(1)" target="_blank"&gt;UN@AR(1)&lt;/A&gt;&amp;nbsp;and I got a negative covariance in the UN structure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it okay ?&lt;/P&gt;&lt;P&gt;How would I explain that?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc mixed data=shproportion method=reml covtest cl info ic plots=vcirypanel ;&lt;BR /&gt;class tree aspect height ;&lt;BR /&gt;model HW_ = height aspect height*aspect / s chisq cl influence residual;&lt;BR /&gt;random tree / g gcorr v vcorr ;&lt;BR /&gt;repeated aspect height / type = UN@AR(1) subject=tree r rcorr ;&lt;BR /&gt;lsmeans aspect height / pdiff=all ;&lt;BR /&gt;contrast 'aspect 1 vs 2 intercept' aspect 1 -1 ;&lt;BR /&gt;contrast 'aspect 1 vs 2 slope' aspect 1 -1 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JOADUTWUM_0-1613632499560.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54870i25502D7C530CCFB7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JOADUTWUM_0-1613632499560.png" alt="JOADUTWUM_0-1613632499560.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2,1 is negative.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Feb 2021 07:16:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/720121#M34856</guid>
      <dc:creator>JOADUTWUM</dc:creator>
      <dc:date>2021-02-18T07:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: MIXED EFFECTS MODELING</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/720921#M34904</link>
      <description>&lt;P&gt;A negative value of UN(2,1) indicates that the covariance is negative. A negative covariance is okay.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Feb 2021 15:05:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/MIXED-EFFECTS-MODELING/m-p/720921#M34904</guid>
      <dc:creator>jiltao</dc:creator>
      <dc:date>2021-02-22T15:05:27Z</dc:date>
    </item>
  </channel>
</rss>

