<?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 mixed estimated V matrix for different subjects in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213264#M11499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are looking to fit a random slopes model (in har_y), this looks good.&amp;nbsp; I still think of it as a random intercepts model, with a single G side random statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;random intercept cult blk/subject=loc type=un;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I end up thinking this because of the R side factors including all of these variance components in an unstructured covariance structure matrix.&amp;nbsp; My experience would be that the output would throw a message that the G matrix was not positive definite--basically saying that the R part was explaining all of the variability.&amp;nbsp; However, with sufficient data, it could be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jun 2015 13:04:03 GMT</pubDate>
    <dc:creator>SteveDenham</dc:creator>
    <dc:date>2015-06-29T13:04:03Z</dc:date>
    <item>
      <title>proc mixed estimated V matrix for different subjects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213260#M11495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello SAS community,&lt;/P&gt;&lt;P&gt;Following is the model that I'm interested to extract blocks of the V matrix using hold option with known or predefined variance parameters. I would like to get V matrix that contains G-side and R-side structure at plot level, i.e.a matrix of 240 x 240 in the following example.&lt;/P&gt;&lt;P&gt;I was able to get V matrix for location as subject, but I'm not sure how to change the subject to a plot level to get V with both G and R structures.&lt;BR /&gt;*Generate numbers;&lt;BR /&gt;data one;&lt;BR /&gt;&amp;nbsp; do har_y = 1 to 2; * two harvest years;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; do loc = 1 to 5;&amp;nbsp; * five locations ; &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do blk = 1 to 4; * four blocks;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do cult = 1 to 6;*six cultivars;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yield= 1; * dummy value&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;*Sort &lt;BR /&gt;proc print; run;&lt;BR /&gt;proc sort data=one out=two;by har_y loc blk cult;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc mixed lognote data=two;&lt;BR /&gt;&amp;nbsp; class cult loc har_y blk;&lt;BR /&gt;&amp;nbsp; model yield=cult har_y cult*har_y;&lt;BR /&gt;&amp;nbsp; random har_y/subject=loc type=csh;&lt;BR /&gt;&amp;nbsp; random har_y/subject=loc*cult type=csh;&lt;BR /&gt;&amp;nbsp; random har_y/subject=loc*blk type=csh v ;&lt;BR /&gt;&amp;nbsp; repeated har_y/subject=loc*blk*cult type=csh r;&lt;BR /&gt;&amp;nbsp; parms(6.1387) (3.9508) ( 0.7087) (0.09453) (0.1454) (0.8500) (0.01970) (0.04729) (0) (0.8706) (0.7041) (0.5151)/noiter hold= 1 2 3 4 5 6 7 8 9 10 11 12; *parameters used to get V matrix &lt;BR /&gt;ods output Tests3 = vcfixed CovParms=vcparms FitStatistics= vcfitstat v=v1 r=r1 ;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance for your time and consideration.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 20:34:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213260#M11495</guid>
      <dc:creator>RVS</dc:creator>
      <dc:date>2015-06-24T20:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimated V matrix for different subjects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213261#M11496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This isn't going to help at all, but I am surprised that you don't get a message in the output that the G matrix is not positive definite. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears that the repeated statement has a subject of loc*blk*cult, which I assume is at the plot level.&amp;nbsp; With what you have, I guess I would have approached this somewhat differently:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc mixed lognote data=two;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class cult loc har_y blk;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model yield=cult har_y cult*har_y;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random intercept cult blk/subject=loc type=csh v;&lt;/P&gt;&lt;P&gt;&amp;nbsp; repeated har_y/subject=loc*blk*cult type=csh r;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that this fits 3 random effects (loc, loc*cult and loc*blk) each with different values and constant covariances between all effects.&amp;nbsp; Putting harvest year in as both a random and repeated effect seems hard to justify in my opinion--I would see it as random if measurements were on different plots in the two years, and repeated if on the same plot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See if this helps any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 17:11:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213261#M11496</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-06-26T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimated V matrix for different subjects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213262#M11497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Steve for your suggestion on the model fitting. I was trying different variance-covariance structures on the&amp;nbsp; field trials data set that consists of multiple harvest.Yes,I had a problem with not positive definite G matrix (only for few trials), but I resolved that by providing different initial parms. The three random statements in my original question was to model har_y at three random subject levels, i.e. loc, loc*cult and loc*blk. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RVS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 19:38:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213262#M11497</guid>
      <dc:creator>RVS</dc:creator>
      <dc:date>2015-06-26T19:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimated V matrix for different subjects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213263#M11498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did replicate proc mixed code into proc glimmix, this provided a V matrix consists of 240 x 240 to the plot level. Do you think it is appropriate?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc glimmix&amp;nbsp; data=two;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class cult loc har_y blk;&lt;/P&gt;&lt;P&gt;&amp;nbsp; model yield=cult har_y cult*har_y;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random har_y/subject=loc type=un;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random har_y/subject=loc*cult type=un;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random har_y/subject=loc*blk type=un;&lt;/P&gt;&lt;P&gt;&amp;nbsp; random har_y/ residual subject=loc*blk*cult type=un v;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ods output Tests3 = vcfixed CovParms=vcparms FitStatistics= vcfitstat v=glimmix ;&lt;/P&gt;&lt;P&gt; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time and consideration.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RVS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 20:39:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213263#M11498</guid>
      <dc:creator>RVS</dc:creator>
      <dc:date>2015-06-26T20:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: proc mixed estimated V matrix for different subjects</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213264#M11499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are looking to fit a random slopes model (in har_y), this looks good.&amp;nbsp; I still think of it as a random intercepts model, with a single G side random statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;random intercept cult blk/subject=loc type=un;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I end up thinking this because of the R side factors including all of these variance components in an unstructured covariance structure matrix.&amp;nbsp; My experience would be that the output would throw a message that the G matrix was not positive definite--basically saying that the R part was explaining all of the variability.&amp;nbsp; However, with sufficient data, it could be done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve Denham&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 13:04:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/proc-mixed-estimated-V-matrix-for-different-subjects/m-p/213264#M11499</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-06-29T13:04:03Z</dc:date>
    </item>
  </channel>
</rss>

