Permalink
Please sign in to comment.
Browse files
Merge branch 'anova-cca-use-permutest'
- anova.cca by = "terms" uses directly permutest(..., by="term") and runs mainly in compiled code (hence is faster) - by = "margin" redesigned: no update() of formula, no partial term (hence robust against scoping problems), works with NA data - by = "axis" uses now 'forward' tests instead of marginal (which were biased) at the price of being 3-4 times slower - anova.cca lists of models mangled long model formulae - adonis2 bug fix: was not adapted to new permutation design - model.frame is more robust with subsets - model.matrix finds result directly from the result object and avoids scoping problems; works even when model.frame fails with scope - ordConstrained gained new method="pass" that can refit a model instead of update() of formula (which has scoping issues)
- Loading branch information...
Showing
with
428 additions
and 284 deletions.
- +1 −0 NAMESPACE
- +2 −0 R/adonis2.R
- +97 −81 R/anova.ccabyterm.R
- +2 −1 R/anova.ccalist.R
- +0 −1 R/capscale.R
- +0 −1 R/cca.default.R
- +0 −1 R/dbrda.R
- +6 −3 R/model.frame.cca.R
- +37 −13 R/model.matrix.cca.R
- +21 −9 R/ordConstrained.R
- +1 −1 R/permutest.cca.R
- +1 −1 R/rda.default.R
- +34 −37 man/anova.cca.Rd
- +10 −3 man/model.matrix.cca.Rd
- +45 −49 tests/cca-object-tests.Rout.save
- +8 −11 tests/vegan-tests.R
- +163 −72 tests/vegan-tests.Rout.save
| @@ -1,17 +1,20 @@ | ||
| `model.frame.cca` <- | ||
| - function (formula, ...) | ||
| + function (formula, ...) | ||
| { | ||
| if (inherits(formula, "prc")) | ||
| stop("model.frame does not work with 'prc' results") | ||
| call <- formula$call | ||
| - m <- match(c("formula", "data", "na.action", "subset"), names(call), | ||
| + m <- match(c("formula", "data", "na.action", "subset"), names(call), | ||
| 0) | ||
| call <- call[c(1, m)] | ||
| + ## subset must be evaluated before ordiParseFormula | ||
| + if (!is.null(call$subset)) | ||
| + call$subset <- formula$subset | ||
| call[[1]] <- as.name("ordiParseFormula") | ||
| out <- eval(call, environment(), parent.frame()) | ||
| mf <- out$modelframe | ||
| attr(mf, "terms") <- out$terms.expand | ||
| - if (!is.null(out$na.action)) | ||
| + if (!is.null(out$na.action)) | ||
| attr(mf, "na.action") <- out$na.action | ||
| mf | ||
| } |
Oops, something went wrong.
0 comments on commit
3ae94eb