-
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
anova.cca by="margin" inconsistent with earlier version #291
Comments
You have noticed that it makes no sense to have marginal test with only one variable? It did not occur to me that somebody would do so, and it seems that we do not handle this case gracefully. At the moment the best thing you can do is that you don't have marginal tests when you have only one variable and hence no marginal effects. I'll fix this, though. |
Yes, I’m fully aware it makes no sense to do so. I noticed it when I was explaining to a student how to use the package - in particular what “by=margin” was doing. The result from the previous version made sense since if only one term in is the model, it will be the last thing entered in the model. For me it was all about pedagogy.
Thanks for maintaining a great package!
Jim
… On Sep 20, 2018, at 4:08 PM, Jari Oksanen ***@***.***> wrote:
You have noticed that it makes no sense to have marginal test with only one variable? It did not occur to me that somebody would do so, and it seems that we do not handle this case gracefully. At the moment the best thing you can do is that you don't have marginal tests when you have only one variable and hence no marginal effects. I'll fix this, though.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#291 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ANYYMZlL8ju0jrhhqwu2pOVRBFRvF_Rpks5uc_WogaJpZM4WylmZ>.
|
We only tested for non-null constraints & conditins in ordConstrained, but we could have null data in 0-column matrix, and then we actually ran unconstrained ordination instead of skipping analysis. This happened in github issue #291, where a marginal anova.cca() gave wrong results when the model only had one variable: when that one variable was dropped, we got a zero-column constraint matrix.
We re-wrote completely constrained ordination and permutations tests for vegan 2.5-1, and a tiny detail in the ordination infrastructure caused this bug. The marginal effects are tested by removing each variable in turn and seeing how the full model changes. If there is only one constraining variable, it makes no sense to drop it because the remaining model is unconstrained, and the constraint matrix has zero columns. We did not have any guard of this in 2.4-6 either, but incidentally the model was handled correctly, but 2.5-1 needed a check against such models. Suggested fix is in commit eefb4a7. |
Overall anova (without by=) and all by= cases in anova.cca and permutest.cca should be equal when there is only 1-df variable. Github issue #291 reported this to fail for by="margin".
Closed with commit 6f28cda |
We only tested for non-null constraints & conditins in ordConstrained, but we could have null data in 0-column matrix, and then we actually ran unconstrained ordination instead of skipping analysis. This happened in github issue #291, where a marginal anova.cca() gave wrong results when the model only had one variable: when that one variable was dropped, we got a zero-column constraint matrix. (cherry picked from commit eefb4a7)
The anova.cca function in version 2.5-2 is giving answers (p-values) that are inconsistent with earlier versions (and don't make sense to me) when using by="margin". In particular, when using by="margin" things are showing up as "significant" that seem erroneous.
Below is code and results using version 2.4-6 and 2.5-2.
vegan version 2.4-6
vegan version 2.5-2
The text was updated successfully, but these errors were encountered: