[Vegan-commits] r2032 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Dec 21 12:57:02 CET 2011
Author: jarioksa
Date: 2011-12-21 12:57:01 +0100 (Wed, 21 Dec 2011)
New Revision: 2032
Modified:
pkg/vegan/R/oecosimu.R
pkg/vegan/R/print.oecosimu.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/oecosimu.Rd
Log:
revert r2029: 't ain't right
Modified: pkg/vegan/R/oecosimu.R
===================================================================
--- pkg/vegan/R/oecosimu.R 2011-12-20 11:35:15 UTC (rev 2031)
+++ pkg/vegan/R/oecosimu.R 2011-12-21 11:57:01 UTC (rev 2032)
@@ -1,7 +1,7 @@
`oecosimu` <-
function(comm, nestfun, method, nsimul=99,
burnin=0, thin=1, statistic = "statistic",
- alternative = c("two.sided", "less", "greater", "pick"),
+ alternative = c("two.sided", "less", "greater"),
parallel = getOption("mc.cores", 1L), ...)
{
alternative <- match.arg(alternative)
@@ -106,8 +106,7 @@
p <- switch(alternative,
two.sided = 2*pmin(pless, pmore),
less = pless,
- greater = pmore,
- pick = pmin(pless, pmore))
+ greater = pmore)
p <- pmin(1, (p + 1)/(nsimul + 1))
## ADDITION: if z is NA then it is not correct to calculate p values
Modified: pkg/vegan/R/print.oecosimu.R
===================================================================
--- pkg/vegan/R/print.oecosimu.R 2011-12-20 11:35:15 UTC (rev 2031)
+++ pkg/vegan/R/print.oecosimu.R 2011-12-21 11:57:01 UTC (rev 2032)
@@ -11,8 +11,7 @@
alt.char <- switch(x$oecosimu$alternative,
two.sided = "not equal to",
less = "less than",
- greater = "greater than",
- pick = "less or greater than")
+ greater = "greater than")
cat("\nalternative hypothesis: simulated median is", alt.char, "the statistic")
## dim attribute is always there, but print all others
@@ -25,8 +24,7 @@
probs <- switch(x$oecosimu$alternative,
two.sided = c(0.025, 0.5, 0.975),
less = c(0, 0.5, 0.95),
- greater = c(0.05, 0.5, 1),
- pick = c(0.05, 0.5, 0.95))
+ greater = c(0.05, 0.5, 1))
qu <- apply(x$oecosimu$simulated, 1, quantile, probs=probs, na.rm = TRUE)
m <- cbind("statistic" = x$oecosimu$statistic,
"z" = x$oecosimu$z, "mean" = x$oecosimu$means, t(qu),
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2011-12-20 11:35:15 UTC (rev 2031)
+++ pkg/vegan/inst/ChangeLog 2011-12-21 11:57:01 UTC (rev 2032)
@@ -19,13 +19,7 @@
* oecosimu: more informative text on 'alternative' hypotheses in
the printed output. Return also the mean of simulations and show
- that in the printed output. Added 'alternative = "pick"' which
- performs two one-sided tests (both "less" and "greater"), and
- returns the results of the one with lower p-value. This does not
- sound fair, but is provided for compatibility with EcosSim.exe
- which returns both one-way tests for authors to choose (and
- presumably they often pick the lower p-value, and if they know,
- they can use specific 'alternative' in oecosimu()).
+ that in the printed output.
* rarecurve: new function to draw rarefaction curves for each
plot, optionally with sample size vertical and corresponding
Modified: pkg/vegan/man/oecosimu.Rd
===================================================================
--- pkg/vegan/man/oecosimu.Rd 2011-12-20 11:35:15 UTC (rev 2031)
+++ pkg/vegan/man/oecosimu.Rd 2011-12-21 11:57:01 UTC (rev 2032)
@@ -28,8 +28,7 @@
\usage{
oecosimu(comm, nestfun, method, nsimul = 99, burnin = 0, thin = 1,
- statistic = "statistic",
- alternative = c("two.sided", "less", "greater", "pick"),
+ statistic = "statistic", alternative = c("two.sided", "less", "greater"),
parallel = getOption("mc.cores", 1L), ...)
\method{as.ts}{oecosimu}(x, ...)
\method{as.mcmc}{oecosimu}(x)
@@ -71,11 +70,8 @@
\item{statistic}{The name of the statistic returned by
\code{nestfun}.}
\item{alternative}{a character string specifying the alternative
- hypothesis, must be one of \code{"two.sided"} (default), \code{"greater"},
- \code{"less"} or \code{"pick"}. The case \code{"pick"} analyses both
- \code{"greater"} and \code{"less"} one-sided tests and selects the one
- with lower \eqn{p}-value; this is not recommended but is provided for
- compatibility with some other software.}
+ hypothesis, must be one of \code{"two.sided"} (default), \code{"greater"}
+ or \code{"less"}.}
\item{parallel}{Number of parallel processes or a predefined socket
cluster. With \code{parallel = 1} uses ordinary, non-parallel
processing. The parallel processing is done with \pkg{parallel}
More information about the Vegan-commits
mailing list