Skip to content

Commit

Permalink
cca etc: get factor centroids from LC scores instead of WA
Browse files Browse the repository at this point in the history
In principle LC and WA scores give same centroids, but they differ
numerically. With cca(dune, dune.env) max differences in any method
are at magnitude 1e-15. This really does not matter, but since LC
scores are found first and WA scores are derived from those, LC
scores may be preferable. In old code, dbrda already used LC scores,
but cca, rda & capscale used WA scores.
  • Loading branch information
jarioksa committed Jun 11, 2024
1 parent 07372a9 commit 2aabcba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/centroids.cca.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
{
if (is.null(ord$CCA) || ord$CCA$rank < 1)
return(NULL)
centroids <- centroids.cca(ord$CCA$wa, mframe, ord$rowsum)
centroids <- centroids.cca(ord$CCA$u, mframe, ord$rowsum)
if (!is.null(ord$CCA$alias))
centroids <- unique(centroids)
## See that there really are centroids
Expand Down

0 comments on commit 2aabcba

Please sign in to comment.