<?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 Calculate R2 for mixed models:  Nakagawa and Schielzeth method? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197072#M10564</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible in any of the mixed model programs to calculate an R2 using the recently published Nakagawa and Schielzeth 2013 (Methods in Ecology and Evolution) formula?&amp;nbsp; I have a very large mixed model, and I'd rather not calculate it by hand...&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jul 2015 13:49:11 GMT</pubDate>
    <dc:creator>bennett</dc:creator>
    <dc:date>2015-07-07T13:49:11Z</dc:date>
    <item>
      <title>Calculate R2 for mixed models:  Nakagawa and Schielzeth method?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197072#M10564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible in any of the mixed model programs to calculate an R2 using the recently published Nakagawa and Schielzeth 2013 (Methods in Ecology and Evolution) formula?&amp;nbsp; I have a very large mixed model, and I'd rather not calculate it by hand...&amp;nbsp; Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 13:49:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197072#M10564</guid>
      <dc:creator>bennett</dc:creator>
      <dc:date>2015-07-07T13:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate R2 for mixed models:  Nakagawa and Schielzeth method?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197073#M10565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you provide the formula?&amp;nbsp; We can probably figure out the correct ODS files to get what is needed, and it is then just a DATA step program.&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>Wed, 08 Jul 2015 16:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197073#M10565</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-07-08T16:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate R2 for mixed models:  Nakagawa and Schielzeth method?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197074#M10566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for my delayed reply!&amp;nbsp; I replied to the email, but I don't think you received it?&amp;nbsp; My email is below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Steve,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Excellent!!&amp;nbsp; You have made my day!&amp;nbsp; I can actually do you one better and provide the papers which give the complete formulations (and their derivations).&amp;nbsp; The Nakagawa and Schielzeth paper is attached as well as the update by Johnson which applies to random slopes as well as random intercept models.&amp;nbsp; Both papers also provide R code (which I have also attached) if that helps as well.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;My ultimate goal is to calculate the variation explained by the some of the fixed effects in my model, and the r2 is the first step.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Thank you!!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Alison&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;P.S. I couldn't attach any files so here are the weblinks:&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif'; color: #1f497d;"&gt;Johnson 2014:&amp;nbsp; &lt;A href="http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12225/epdf" title="http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12225/epdf"&gt;http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12225/epdf&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Johnson 2014 R code:&amp;nbsp; &lt;A href="http://onlinelibrary.wiley.com/store/10.1111/2041-210X.12225/asset/supinfo/mee312225-sup-0001-RScript.R?v=1&amp;amp;s=09ff71cf1ff0058eed83fc3c8bd694c649764767" title="http://onlinelibrary.wiley.com/store/10.1111/2041-210X.12225/asset/supinfo/mee312225-sup-0001-RScript.R?v=1&amp;amp;s=09ff71cf1ff0058eed83fc3c8bd694c649764767"&gt;http://onlinelibrary.wiley.com/store/10.1111/2041-210X.12225/asset/supinfo/mee312225-sup-0001-RScript.R?v=1&amp;amp;s=09ff71cf1ff0058eed83fc3c8bd694c649764767&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Nakagawa &amp;amp; Schielzeth 2013:&amp;nbsp; &lt;A href="http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210x.2012.00261.x/epdf" title="http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210x.2012.00261.x/epdf"&gt;http://onlinelibrary.wiley.com/doi/10.1111/j.2041-210x.2012.00261.x/epdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Nakagawa &amp;amp; Schielzeth 2013 R code:&amp;nbsp; &lt;A href="http://onlinelibrary.wiley.com/store/10.1111/j.2041-210x.2012.00261.x/asset/supinfo/mee3261-sup-0004-DataS4.R?v=1&amp;amp;s=df4e356429d67469bbf0b0ef3125381c308df654" title="http://onlinelibrary.wiley.com/store/10.1111/j.2041-210x.2012.00261.x/asset/supinfo/mee3261-sup-0004-DataS4.R?v=1&amp;amp;s=df4e356429d67469bbf0b0ef3125381c308df654"&gt;http://onlinelibrary.wiley.com/store/10.1111/j.2041-210x.2012.00261.x/asset/supinfo/mee3261-sup-0004-DataS4.R?v=1&amp;amp;s=df4e356429d67469bbf0b0ef3125381c308df654&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 12:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197074#M10566</guid>
      <dc:creator>bennett</dc:creator>
      <dc:date>2015-07-14T12:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate R2 for mixed models:  Nakagawa and Schielzeth method?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197075#M10567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like what is needed are several runs to get what is needed.&amp;nbsp; I have tried to match the R objects in the Nakagawa&amp;amp;Schielzeth R code paper to what I think you need from SAS output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VarF: Residual error from a fixed effects only design&lt;/P&gt;&lt;P&gt;the various VarCorr estimates are obtained as the variance components of the random effects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marginal Rsq is then VarF/Sum (VarF + all VarCorrs&amp;nbsp; + residual error variance)&lt;/P&gt;&lt;P&gt;Conditional Rsq is Sum(VarF + all VarCorrs)/Sum ( VarF + all VarCorrs&amp;nbsp; + residual error variance)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can get all of these using ODS output.&amp;nbsp; The table name is CovParms.in all of the mixed model procedures I am familiar with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only drawback I see to this approach is that I would have a hard time extending this beyond a simple variance component approach.&amp;nbsp; Once structured covariances enter the picture, the various components are not necessarily strictly additive--any correlation type parameters would mean that there is some sort of shrinkage not necessarily correctly accounted for, so that these Rsq values would be inflated.&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>Tue, 14 Jul 2015 12:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/197075#M10567</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2015-07-14T12:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate R2 for mixed models:  Nakagawa and Schielzeth method?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/876199#M43313</link>
      <description>&lt;P&gt;Dear Steve,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have read this post as I am also interested in creating this R2 measure. I want to use the PROC GLIMMIX option so I can use two weight variables at each level of my model (students nested within schools).&lt;/P&gt;&lt;P&gt;The goal would be to create a conditional R2. The Varcorrs are the paramters in the Covparm table (intercept) as I only will run a random intercept model. The residual error variance can also be found in that table if i am not mistaken.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am just unsure how to compute the VarF as mentioned in your post. Could you elaborate on this?&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Emilie Franck&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:47:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/876199#M43313</guid>
      <dc:creator>Emiliefranck1</dc:creator>
      <dc:date>2023-05-17T12:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate R2 for mixed models:  Nakagawa and Schielzeth method?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/885271#M43839</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone knows or is able to elaborate on my previous question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am rather new to SAS and I do not seem to find it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks in advance,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Emilie Franck&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jul 2023 14:00:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Calculate-R2-for-mixed-models-Nakagawa-and-Schielzeth-method/m-p/885271#M43839</guid>
      <dc:creator>Emiliefranck1</dc:creator>
      <dc:date>2023-07-18T14:00:57Z</dc:date>
    </item>
  </channel>
</rss>

