-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'restore-partial-R2-adj'
This merge re-enables calculation of adj-R2 for partial RDA that was removed in vegan release 2.5-1. It also implements adj-R2 for partial CCA in a way that is consistent with RDA and varpart. Before 2.5-1 release CCA was inconsistent. See github issue #295
- Loading branch information
Showing
2 changed files
with
27 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40584a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello !
I am trying to get the Adjusted R2 for a RDA analysis but when using the following script it always gives me 1 as R2 result and NA as adjusted r2 ... for any RDA based on any dataset... The vegan package I am using is the 2.5-6. I wonder if there is another way to calculate the adjusted R2 (or at least some r2) ... the varpart doesn't work in my case because we only have 1 explanatory matrix so it gives an error message that it needs more data tables...
Here is the script and results for the adjusted R2
$adj.r.squared
[1] NA
Thank you for your help.
Camilla
40584a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should happen (it is so coded) if you have a saturated model which has no residual variation after constraints. Saturated model means that for data of n observations the number of explanatory terms is n–1 or greater. I don't have your data, but if the unadjusted R2 = 1, you have no residual variation and adjusted R2 cannot be meaningfully calculated.
40584a1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, Indeed, I see... so it comes from my data which has 12 rows for 26 explanatory variables... I have tried to use vif.cca() to select some of the explanatory variables based on Brocard, Gillet, Legendre 2011. But still gives R2=1 and NA for the adjusted. I am not so sure what to do next...