[Vegan-commits] r2546 - in branches/2.0: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jul 9 15:32:28 CEST 2013
Author: jarioksa
Date: 2013-07-09 15:32:28 +0200 (Tue, 09 Jul 2013)
New Revision: 2546
Modified:
branches/2.0/R/oecosimu.R
branches/2.0/R/print.oecosimu.R
branches/2.0/R/raupcrick.R
branches/2.0/inst/ChangeLog
branches/2.0/man/oecosimu.Rd
Log:
merge r2495,8: test direction in oecosimu
Modified: branches/2.0/R/oecosimu.R
===================================================================
--- branches/2.0/R/oecosimu.R 2013-07-09 13:22:12 UTC (rev 2545)
+++ branches/2.0/R/oecosimu.R 2013-07-09 13:32:28 UTC (rev 2546)
@@ -102,8 +102,8 @@
z <- (indstat - means)/sd
if (any(sd < sqrt(.Machine$double.eps)))
z[sd < sqrt(.Machine$double.eps)] <- 0
- pless <- rowSums(indstat <= simind, na.rm = TRUE)
- pmore <- rowSums(indstat >= simind, na.rm = TRUE)
+ pless <- rowSums(indstat >= simind, na.rm = TRUE)
+ pmore <- rowSums(indstat <= simind, na.rm = TRUE)
if (any(is.na(simind))) {
warning("some simulated values were NA and were removed")
nsimul <- nsimul - rowSums(is.na(simind))
Modified: branches/2.0/R/print.oecosimu.R
===================================================================
--- branches/2.0/R/print.oecosimu.R 2013-07-09 13:22:12 UTC (rev 2545)
+++ branches/2.0/R/print.oecosimu.R 2013-07-09 13:32:28 UTC (rev 2546)
@@ -13,10 +13,10 @@
cat("options: ", paste(names(att), att, collapse=", "))
}
alt.char <- switch(x$oecosimu$alternative,
- two.sided = "not equal to",
+ two.sided = "less or greater than",
less = "less than",
greater = "greater than")
- cat("\nalternative hypothesis: simulated median is", alt.char, "the statistic")
+ cat("\nalternative hypothesis: statistic is", alt.char, "simulated values")
## dim attribute is always there, but print all others
cat("\n\n")
Modified: branches/2.0/R/raupcrick.R
===================================================================
--- branches/2.0/R/raupcrick.R 2013-07-09 13:22:12 UTC (rev 2545)
+++ branches/2.0/R/raupcrick.R 2013-07-09 13:32:28 UTC (rev 2546)
@@ -12,7 +12,7 @@
## but is much slower
sol <- oecosimu(comm, function(x) tcrossprod(x)[tri], method = null,
nsimul = nsimul,
- alternative = if (chase) "greater" else "less")
+ alternative = if (chase) "less" else "greater")
## Chase et al. way, or the standard way
if (chase)
out <- 1 - sol$oecosimu$pval
Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog 2013-07-09 13:22:12 UTC (rev 2545)
+++ branches/2.0/inst/ChangeLog 2013-07-09 13:32:28 UTC (rev 2546)
@@ -11,7 +11,9 @@
* merge r2534: lwd in ordisurf.
* merge r2533: ordipointlabel uses ordiArgAbsorber.
* merge r2504: notation in adipart.Rd.
+ * merge r2498: adapt raupcrick to r2495.
* merge r2497: avoid visible ~ in .Rnw.
+ * merge r2495: fix twisted test direction in oecosimu.
* merge r2490 thru 2493: ordisurf new options.
* merge r2484 thru 2486: betadisper fixes (centroid with one
group, call it medoid).
Modified: branches/2.0/man/oecosimu.Rd
===================================================================
--- branches/2.0/man/oecosimu.Rd 2013-07-09 13:22:12 UTC (rev 2545)
+++ branches/2.0/man/oecosimu.Rd 2013-07-09 13:32:28 UTC (rev 2546)
@@ -251,7 +251,11 @@
## Use the first eigenvalue of correspondence analysis as an index
## of structure: a model for making your own functions.
data(sipoo)
-out <- oecosimu(sipoo, decorana, "swap", burnin=100, thin=10, statistic="evals")
+## Traditional nestedness statistics (number of checkerboard units)
+oecosimu(sipoo, nestedchecker, "r0")
+## sequential model, one-sided test, a vector statistic
+out <- oecosimu(sipoo, decorana, "swap", burnin=100, thin=10,
+ statistic="evals", alt = "greater")
out
## Inspect the swap sequence as a time series object
plot(as.ts(out))
More information about the Vegan-commits
mailing list