-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RsquareAdj not returning $adj.r.squared in versions 2.5+ (including 2.6) #295
Comments
This is even documented -- NEWS for the release 2.5-1 say:
We used one way in vegan, but after inspecting alternative ways of defining R2adj I was no longer sure that the way we used was correct and compelling for partial ordination. Therefore the feature was disabled in partial ordination. Just as soon as I get convinced on the correct way, I can re-implement the feature. Perhaps after I get response to my queries (@legendre @gavinsimpson) the situation can change. |
Hey Jari, Thanks for the fast reply! I completely missed this release note. Yeah, I see that is wise not to implement something that you are not sure how it is better done. Would this also apply for AdjRsquare of varpart function? For instance, considering the example in my post, the adj.r.squared that I get from RsquareAdj(m) using version 2.4-5 is 0.1568308. This is identical to the Adj.R.Square that I get calling varpart for the individual fraction [a] = X1 | X2+X3 obtained with version 2.6: In 2.4-5
In 2.6
I am basically mimicking varpart using Condition as in an old tutorial of yours Constrained Ordination: Tutorial with R and vegan (jan, 2012). Now wondering if I should stop using this approach until further reply from @legendre and @gavinsimpson. Cheers, |
Hello Jari.
About the adjusted R-square in partial regression and partial RDA:
1. Please open the "Numerical ecology with R" (2018, orange) book. In the last paragraph of page 234, we explain how the R2.adj is computed in partial RDA. There is a reference to the Peres-Neto et al. (2006) paper.
We are happy with that computation method until proven that this calculation method produces results that are incorrect. In the meantime, it goes around the difficulty that R2.adj cannot be computed directly using an equation. Even if only for that, I believe the procedure should be maintained in vegan.
2. What are the "alternative ways of defining R2.adj" that you are referring to in your message?
Pierre
========
… Le 6 nov. 2018 à 10:29, Jari Oksanen ***@***.***> a écrit :
This is even documented -- NEWS for the release 2.5-1 say:
• Adjusted R-squared is not calculated for partial ordination,
because it is unclear how this should be done (function
`RsquareAdj`).
We used one way in vegan, but after inspecting alternative ways of defining R2adj I was no longer sure that the way we used was correct and compelling for partial ordination. Therefore the feature was disabled in partial ordination. Just as soon as I get convinced on the correct way, I can re-implement the feature. Perhaps after I get response to my queries ***@***.*** <https://github.com/legendre> @gavinsimpson <https://github.com/gavinsimpson>) the situation can change.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#295 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABf7nM-mQ6MyBJlihGoAPG1jN8efjkEEks5usarpgaJpZM4YQeCz>.
---
Pierre Legendre ------------------- Courriel: Pierre.Legendre@UMontreal.CA
Département de sciences biologiques,
Université de Montréal,
C.P. 6128, succ. Centre-ville, Tel.: (514) 343-7591
Montréal, Québec H3C 3J7, Canada Fax : (514) 343-2293
http://www.numericalecology.com/
** Nouveaux livres --
** Legendre & Legendre 2012: Numerical ecology, 3rd English ed (Elsevier).
** Borcard, Gillet & Legendre 2014: Numerical ecology with R, Chinese ed.
** Borcard, Gillet & Legendre 2018: Numerical ecology with R, 2nd English ed.
|
@legendre : A little bit of history. We have The previous method was similar as in your NEwR book, and it can be re-instated by reverting a commit. Then we should still decide what to do with the partial CCA: (1) leave it I have made this issue a milestone for 2.5-4, and we can have a new release (fixing issue #299) with merged changes as soon as we decide what to change (back). The commit history and my comments can be found with |
I have now re-instated adjusted R2 for pRDA, and also added a consistent version of the same for pCCA on branch restore-partial-R2-adj. Both of these are also consistent with |
Thank you, Jari, for putting back the calculation of adjusted R-squares in pRDA function.
[[ Why do we call it pRDA? There is no pRDA funciton in vegan! But I know what you are talking about: pRDA is the pseudo-function that you sent me once and that I included in Table 11.5 of "Numerical eoology" (2012 edition), with your permission.]]
Thank you for having also fixed the the goodness problem.
These is very good news for our R book and for users.
Pierre
========
… Le 27 janv. 2019 à 07:55, Jari Oksanen ***@***.***> a écrit :
I have no re-instated adjusted R2 for pRDA, and also added a consistent version of the same for pCCA on branch restore-partial-R2-adj. Both of these are also consistent with varpart. This does not mean that I would be certain that these should be implemented in this way (also concerns varpart).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#295 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABf7nL9ixJ8psFd3d_D1DVbPRBx9w1LRks5vHaHXgaJpZM4YQeCz>.
---
Pierre Legendre ------------------- Courriel: Pierre.Legendre@UMontreal.CA
Département de sciences biologiques,
Université de Montréal,
C.P. 6128, succ. Centre-ville, Tel.: (514) 343-7591
Montréal, Québec H3C 3J7, Canada Fax : (514) 343-2293
http://www.numericalecology.com/
** Nouveaux livres --
** Legendre & Legendre 2012: Numerical ecology, 3rd English ed (Elsevier).
** Borcard, Gillet & Legendre 2014: Numerical ecology with R, Chinese ed.
** Borcard, Gillet & Legendre 2018: Numerical ecology with R, 2nd English ed.
|
@legendre , there is no pRDA function in vegan, but there is |
Thanks Jari.
Now I will know what ansewer to give to students who often ask me why the function in Table 11.5 in the "Numerical ecology" (2012) book is called pRDA.
I remember the reaction of Cajo when he first saw it: he wrote back and described the funciton as "superb programming".
Pierre
========
… Le 28 janv. 2019 à 12:52, Jari Oksanen ***@***.***> a écrit :
@legendre <https://github.com/legendre> , there is no pRDA function in vegan, but there is rda function that can also do pRDA (the method) as well as PCA. Just as well, function cca can do CA, CCA and pCCA, and function dbrda can do PCoA, dbRDA and p-dbRDA.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#295 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABf7nGab6_YgV-XStF1lj4MgOVS7brgyks5vHzj0gaJpZM4YQeCz>.
---
Pierre Legendre ------------------- Courriel: Pierre.Legendre@UMontreal.CA
Département de sciences biologiques,
Université de Montréal,
C.P. 6128, succ. Centre-ville, Tel.: (514) 343-7591
Montréal, Québec H3C 3J7, Canada Fax : (514) 343-2293
http://www.numericalecology.com/
** Nouveaux livres --
** Legendre & Legendre 2012: Numerical ecology, 3rd English ed (Elsevier).
** Borcard, Gillet & Legendre 2014: Numerical ecology with R, Chinese ed.
** Borcard, Gillet & Legendre 2018: Numerical ecology with R, 2nd English ed.
|
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
Closed with merge commit 40584a1 which re-enables |
Hi,
I noticed that RsquareAdj do not return $adj.r.squared in the package versions 2.5+ (including 2.6). It works as expected with package version 2.4-5.
Reproducing the error:
Does work
Does not work
By the way, many thanks for this awesome package and your support to the community!
Cheers,
Lucas
The text was updated successfully, but these errors were encountered: