[Vegan-commits] r2717 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Nov 20 18:03:19 CET 2013


Author: jarioksa
Date: 2013-11-20 18:03:19 +0100 (Wed, 20 Nov 2013)
New Revision: 2717

Modified:
   pkg/vegan/R/permutest.cca.R
Log:
permutest gave wrong residual df for models for partial models without constraints (only Conditions)

Modified: pkg/vegan/R/permutest.cca.R
===================================================================
--- pkg/vegan/R/permutest.cca.R	2013-11-20 16:46:47 UTC (rev 2716)
+++ pkg/vegan/R/permutest.cca.R	2013-11-20 17:03:19 UTC (rev 2717)
@@ -13,7 +13,8 @@
     if (is.null(x$CCA)) {
         sol <- list(call = match.call(), testcall = x$call, model = NA,
                     F.0 = NA, F.perm = NA, chi = c(0, x$CA$tot.chi),
-                    num = 0, den = 0, df = c(0, nrow(x$CA$u) - 1),
+                    num = 0, den = 0,
+                    df = c(0, nrow(x$CA$u) - max(x$pCCA$rank,0) - 1),
                     nperm = 0, method = x$method, first = FALSE,
                     Random.seed = NA)
         class(sol) <- "permutest.cca"



More information about the Vegan-commits mailing list