[Vegan-commits] r2034 - branches/2.0/R branches/2.0/inst branches/2.0/man www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 21 13:14:56 CET 2011


Author: jarioksa
Date: 2011-12-21 13:14:55 +0100 (Wed, 21 Dec 2011)
New Revision: 2034

Modified:
   branches/2.0/R/oecosimu.R
   branches/2.0/R/print.oecosimu.R
   branches/2.0/inst/ChangeLog
   branches/2.0/inst/NEWS.Rd
   branches/2.0/man/oecosimu.Rd
   www/NEWS.html
Log:
merge r2027,28,33: tweaks in oecosimu output

Modified: branches/2.0/R/oecosimu.R
===================================================================
--- branches/2.0/R/oecosimu.R	2011-12-21 12:02:21 UTC (rev 2033)
+++ branches/2.0/R/oecosimu.R	2011-12-21 12:14:55 UTC (rev 2034)
@@ -98,7 +98,8 @@
     }
     ## end of addition
     sd <- apply(simind, 1, sd, na.rm = TRUE)
-    z <- (indstat - rowMeans(simind, na.rm = TRUE))/sd
+    means <- rowMeans(simind, na.rm = TRUE)
+    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)
@@ -124,7 +125,8 @@
         ind <- list(statistic = ind)
     if (method == "custom")
         attr(method, "permfun") <- permfun
-    ind$oecosimu <- list(z = z, pval = p, simulated=simind, method=method,
+    ind$oecosimu <- list(z = z, means = means, pval = p, simulated=simind,
+                         method=method,
                          statistic = indstat, alternative = alternative)
     class(ind) <- c("oecosimu", class(ind))
     ind

Modified: branches/2.0/R/print.oecosimu.R
===================================================================
--- branches/2.0/R/print.oecosimu.R	2011-12-21 12:02:21 UTC (rev 2033)
+++ branches/2.0/R/print.oecosimu.R	2011-12-21 12:14:55 UTC (rev 2034)
@@ -12,7 +12,7 @@
                        two.sided = "not equal to",
                        less = "less than",
                        greater = "greater than")
-    cat("\nalternative hypothesis: true mean is", alt.char, "the statistic")
+    cat("\nalternative hypothesis: simulated median is", alt.char, "the statistic")
     ## dim attribute is always there, but print all others
 
     cat("\n\n")
@@ -27,9 +27,9 @@
                     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, t(qu),
+               "z" = x$oecosimu$z, "mean" = x$oecosimu$means, t(qu),
                "Pr(sim.)"=x$oecosimu$pval)
-    printCoefmat(m, ...)
+    printCoefmat(m, cs.ind = 3:6, ...)
     if (any(is.na(x$oecosimu$simulated))) {
         nacount <- rowSums(is.na(x$oecosimu$simulated))
         cat("\nNumber of NA cases removed from simulations:\n",

Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2011-12-21 12:02:21 UTC (rev 2033)
+++ branches/2.0/inst/ChangeLog	2011-12-21 12:14:55 UTC (rev 2034)
@@ -5,6 +5,7 @@
 Version 2.0-3 (opened November 13, 2011)
 
 	* merge r2030: resurrect old ChangeLog entries.
+	* merge r2027,28,33: tweak oecosimu printed output.
 	* merge r2018,19,21: add nestedbetasor() & nestedbetajac().
 	* merge r2016: empty factor levels in betadisper() fixed in
 	ordimedian(). 

Modified: branches/2.0/inst/NEWS.Rd
===================================================================
--- branches/2.0/inst/NEWS.Rd	2011-12-21 12:02:21 UTC (rev 2033)
+++ branches/2.0/inst/NEWS.Rd	2011-12-21 12:14:55 UTC (rev 2034)
@@ -9,8 +9,9 @@
 
       \item Added new nestedness functions \code{nestedbetasor} and
       \code{nestedbetajac} that implement multiple-site dissimilarity
-      indices of Baselga (\emph{Global Ecology and Biogeography} 19,
-      134--143; 2010).
+      indices and their decomposition into turnover and nestedness
+      components following Baselga (\emph{Global Ecology and
+      Biogeography} 19, 134--143; 2010).
 
       \item Added function \code{rarecurve} to draw rarefaction curves
       for each row (sampling unit) of the input data, optionally with
@@ -37,6 +38,10 @@
        dissimilarities (\code{stepacross}), instead of being treated
        as synonymous with \code{noshare = FALSE} which always
        suppresses extended dissimilarities.
+
+       \item \code{oecosimu} displays the mean of simulations and
+       describes alternative hypothesis more clearly in the printed
+       output. 
      
      }
   } % end new features

Modified: branches/2.0/man/oecosimu.Rd
===================================================================
--- branches/2.0/man/oecosimu.Rd	2011-12-21 12:02:21 UTC (rev 2033)
+++ branches/2.0/man/oecosimu.Rd	2011-12-21 12:14:55 UTC (rev 2034)
@@ -49,7 +49,10 @@
     \code{nestedfun}} 
   \item{alternative}{a character string specifying the alternative
     hypothesis, must be one of \code{"two.sided"} (default), \code{"greater"}
-    or \code{"less"}. You can specify just the initial letter.}
+    or \code{"less"}. Please note that the \eqn{p}-value of two-sided
+    test is approximately two times higher than in the corresponding
+    one-sided test (\code{"greater"} or \code{"less"} depending on the
+    sign of the difference).}
   \item{data}{Ignored argument of the generic function.}
   \item{xlab}{Label of the x-axis.}
   \item{\dots}{Other arguments to functions.}
@@ -179,14 +182,15 @@
   can be dangerous.
 }
 
-\value{
-  Function \code{oecosimu} returns the result of \code{nestfun}
-  with one added component called \code{oecosimu}. The \code{oecosimu}
+\value{ 
+  Function \code{oecosimu} returns the result of \code{nestfun} added
+  with a component called \code{oecosimu}. The \code{oecosimu}
   component contains the simulated values of the statistic (item
-  \code{simulated}), the name of the \code{method}, two-sided \eqn{P}
-  value and z-value of the statistic based on simulation. The
-  \code{commsimulator} returns a null model matrix or a swap of the
-  input matrix.  }
+  \code{simulated}), the name of the \code{method}, \eqn{P} value
+  (with given \code{alternative}), \eqn{z}-value of the statistic
+  based on simulation (also known as standardized effect size), and
+  the mean of simulations.  
+}
 
 \references{
   Gotelli, N.J. & Entsminger, N.J. (2001). Swap and fill algorithms in

Modified: www/NEWS.html
===================================================================
--- www/NEWS.html	2011-12-21 12:02:21 UTC (rev 2033)
+++ www/NEWS.html	2011-12-21 12:14:55 UTC (rev 2034)
@@ -10,70 +10,99 @@
 
 <h3>Changes in version 2.0-3</h3>
 
+<p>
+</p>
+<p>
 
 
-
 <h4>NEW FUNCTIONS</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li><p> Added new nestedness functions <code>nestedbetasor</code> and
+<li> Added new nestedness functions <code>nestedbetasor</code> and
 <code>nestedbetajac</code> that implement multiple-site dissimilarity
-indices of Baselga (<EM>Global Ecology and Biogeography</EM> 19,
-134&ndash;143; 2010).
+indices and their decomposition into turnover and nestedness
+components following Baselga (<EM>Global Ecology and
+Biogeography</EM> 19, 134&ndash;143; 2010).
 </p>
+<p>
 </li>
-<li><p> Added function <code>rarecurve</code> to draw rarefaction curves
+<li>Added function <code>rarecurve</code> to draw rarefaction curves
 for each row (sampling unit) of the input data, optionally with
 lines showing rarefied species richness with given sample size
 for each curve.
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
 
 
 <h4>BUG FIXES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>betadisper()</code> failed when the <code>groups</code> was a
+<li> <code>betadisper()</code> failed when the <code>groups</code> was a
 factor with empty levels.
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
 
 
 <h4>NEW FEATURES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>metaMDS</code> argument <code>noshare = 0</code> is now
+<li> <code>metaMDS</code> argument <code>noshare = 0</code> is now
 regarded as a numeric threshold that always triggers extended
 dissimilarities (<code>stepacross</code>), instead of being treated
 as synonymous with <code>noshare = FALSE</code> which always
 suppresses extended dissimilarities.
 </p>
+<p>
+</li>
+<li><code>oecosimu</code> displays the mean of simulations and
+describes alternative hypothesis more clearly in the printed
+output. 
+</p>
+<p>
 </ul>
 
+</p>
  
+</p>
 
 
 <h3>Changes in version 2.0-2</h3>
 
+<p>
 
 
-
 <h4>BUG FIXES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li><p> Function <code>capscale</code> failed if constrained component
+<li> Function <code>capscale</code> failed if constrained component
 had zero rank. This happened most likely in partial models when
 the conditions aliased constraints. The problem was observed in
 <code>anova(..., by ="margin")</code> which uses partial models to
@@ -82,8 +111,9 @@
 <a href="https://stat.ethz.ch/pipermail/r-help/2011-October/293077.html">R-News
 mailing list</a>.
 </p>
+<p>
 </li>
-<li> <p><code>stressplot</code> and <code>goodness</code> sometimes failed when
+<li><code>stressplot</code> and <code>goodness</code> sometimes failed when
 <code>metaMDS</code> was based on <code>isoMDS</code> (<span class="pkg">MASS</span> package)
 because <code>metaMDSdist</code> did not use the same defaults for
 step-across (extended) dissimilarities as <code>metaMDS(...,
@@ -91,8 +121,9 @@
 triggering of step-across in <code>capscale(..., metaMDSdist =
      TRUE)</code>.
 </p>
+<p>
 </li>
-<li> <p><code>adonis</code> contained a minor bug resulting from
+<li><code>adonis</code> contained a minor bug resulting from
 incomplete implementation of a speed-up that did not affect the
 results. In fixing this bug, a further bug was identified in
 transposing the hat matrices. This second bug was only active
@@ -100,57 +131,73 @@
 speed-up in the internal f.test() function is fully
 realised. Reported by Nicholas Lewin-Koh.
 </p>
+<p>
 </ul>
 
+</p>
   
+</p>
+<p>
 
 
 <h4>NEW FEATURES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>ordiarrows</code> and <code>ordisegments</code> gained argument
+<li> <code>ordiarrows</code> and <code>ordisegments</code> gained argument
 <code>order.by</code> that gives a variable to sort points within
 <code>groups</code>. Earlier the points were assumed to be in order.
 </p>
+<p>
 </li>
-<li><p> Function <code>ordispider</code> invisibly returns the
+<li>Function <code>ordispider</code> invisibly returns the
 coordinates to which the points were connected.  Typically these
 are class centroids of each point, but for constrained ordination
 with no <code>groups</code> they are the LC scores.
 </p>
+<p>
 </ul>
 		 
+</p>
   
+</p>
+<p>
+</p>
 
 
 <h3>Changes in version 2.0-1</h3>
 
+<p>
 
 
-
 <h4>NEW FUNCTIONS</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>clamtest</code>: new function to classify species as
+<li> <code>clamtest</code>: new function to classify species as
 generalists and specialists in two distinct habitats (CLAM test of
 Chazdon et al., <EM>Ecology</EM> 92, 1332&ndash;1343; 2011).  The test is
 based on multinomial distribution of individuals in two habitat
 types or sampling units, and it is applicable only to count data
 with no over-dispersion.
 </p>
+<p>
 </li>
-<li> <p><code>as.preston</code> gained <code>plot</code> and <code>lines</code>
+<li><code>as.preston</code> gained <code>plot</code> and <code>lines</code>
 methods, and <code>as.fisher</code> gained <code>plot</code> method (which
 also can add items to existing plots). These are similar as
 <code>plot</code> and <code>lines</code> for <code>prestonfit</code> and
 <code>fisherfit</code>, but display only data without the fitted lines.
 </p>
+<p>
 </li>
-<li> <p><code>raupcrick</code>: new function to implement Raup-Crick
+<li><code>raupcrick</code>: new function to implement Raup-Crick
 dissimilarity as a probability of number of co-occurring species
 with occurrence probabilities proportional to species
 frequencies.  <span class="pkg">Vegan</span> has Raup-Crick index as a choice in
@@ -161,37 +208,47 @@
 [<a href="http://www.esajournals.org/doi/abs/10.1890/ES10-00117.1">doi:10.1890/ES10-00117.1</a>],
 and was developed with the consultation of Brian Inouye.
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
 
 
 <h4>BUG FIXES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li><p> Function <code>meandist</code> could scramble items and give
+<li> Function <code>meandist</code> could scramble items and give
 wrong results, especially when the <code>grouping</code> was
 numerical. The problem was reported by Dr Miguel Alvarez
 (Univ. Bonn).
 </p>
+<p>
 </li>
-<li> <p><code>metaMDS</code> did not reset <code>tries</code> when a new model
+<li><code>metaMDS</code> did not reset <code>tries</code> when a new model
 was started with a <code>previous.best</code> solution from a different
 model. 
 </p>
+<p>
 </li>
-<li><p> Function <code>permatswap</code> for community null models using
+<li>Function <code>permatswap</code> for community null models using
 quantitative swap never swapped items in a <i>2 by 2</i>
 submatrix if all cells were filled.
 </p>
+<p>
 </li>
-<li><p> The result from <code>permutest.cca</code> could not be
+<li>The result from <code>permutest.cca</code> could not be
 <code>update</code>d because of a &lsquo;<span class="file">NAMESPACE</span>&rsquo; issue.
 </p>
+<p>
 </li>
-<li> <p><font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0 changed so that it does not accept using
+<li><font face="Courier New,Courier" color="#666666"><b>R</b></font> 2.14.0 changed so that it does not accept using
 <code>sd()</code> function for matrices (which was the behaviour at
 least since <font face="Courier New,Courier" color="#666666"><b>R</b></font> 1.0-0), and several <span class="pkg">vegan</span> functions were
 changed to adapt to this change (<code>rda</code>, <code>capscale</code>,
@@ -200,40 +257,54 @@
 results but you probably wish to upgrade <span class="pkg">vegan</span> to avoid
 annoying warnings.
 </p>
+<p>
 </ul>
 	
+</p>
  
+</p>
+<p>
 
 
 <h4>ANALYSES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>nesteddisc</code> is slacker and hence faster when trying
+<li> <code>nesteddisc</code> is slacker and hence faster when trying
 to optimize the statistic for tied column frequencies. Tracing
 showed that in most cases an improved ordering was found rather
 early in tries, and the results are equally good in most cases.
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
+</p>
 
 
 <h3>Changes in version 2.0-0</h3>
 
+<p>
 
 
-
 <h4>GENERAL</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li><p> Peter Minchin joins the <span class="pkg">vegan</span> team.
+<li> Peter Minchin joins the <span class="pkg">vegan</span> team.
 </p>
+<p>
 </li>
-<li> <p><span class="pkg">vegan</span> implements standard <font face="Courier New,Courier" color="#666666"><b>R</b></font> &lsquo;<span class="file">NAMESPACE</span>&rsquo;. In
+<li><span class="pkg">vegan</span> implements standard <font face="Courier New,Courier" color="#666666"><b>R</b></font> &lsquo;<span class="file">NAMESPACE</span>&rsquo;. In
 general, <code>S3</code> methods are not exported which means that you
 cannot directly use or see contents of functions like
 <code>cca.default</code>, <code>plot.cca</code> or <code>anova.ccabyterm</code>. To
@@ -244,24 +315,31 @@
 <code>vegan:::cca.default</code>. This change may break packages,
 documents or scripts that rely on non-exported names.
 </p>
+<p>
 </li>
-<li> <p><span class="pkg">vegan</span> depends on the <span class="pkg">permute</span> package. This
+<li><span class="pkg">vegan</span> depends on the <span class="pkg">permute</span> package. This
 package provides powerful tools for restricted permutation
 schemes. All <span class="pkg">vegan</span> permutation will gradually move to use
 <span class="pkg">permute</span>, but currently only <code>betadisper</code> uses the new
 feature. 
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
 
 
 <h4>NEW FUNCTIONS</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>monoMDS</code>: a new function for non-metric
+<li> <code>monoMDS</code>: a new function for non-metric
 multidimensional scaling (NMDS). This function replaces
 <code>MASS::isoMDS</code> as the default method in
 <code>metaMDS</code>. Major advantages of <code>monoMDS</code> are that it
@@ -275,22 +353,25 @@
 previous alternatives. The function uses <code>Fortran</code> code
 written by Peter Minchin.
 </p>
+<p>
 </li>
-<li> <p><code>MDSrotate</code> a new function to replace
+<li><code>MDSrotate</code> a new function to replace
 <code>metaMDSrotate</code>. This function can rotate both <code>metaMDS</code>
 and <code>monoMDS</code> results so that the first axis is parallel to
 an environmental vector.
 </p>
+<p>
 </li>
-<li> <p><code>eventstar</code> finds the minimum of the evenness profile
+<li><code>eventstar</code> finds the minimum of the evenness profile
 on the Tsallis entropy, and uses this to find the corresponding
 values of diversity, evenness and numbers equivalent following
 Mendes et al. (<EM>Ecography</EM> 31, 450-456; 2008). The code was
 contributed by Eduardo Ribeira Cunha and Heloisa Beatriz Antoniazi
 Evangelista and adapted to <span class="pkg">vegan</span> by Peter Solymos.
 </p>
+<p>
 </li>
-<li> <p><code>fitspecaccum</code> fits non-linear regression models to
+<li><code>fitspecaccum</code> fits non-linear regression models to
 the species accumulation results from <code>specaccum</code>. The
 function can use new self-starting species accumulation models
 in <span class="pkg">vegan</span> or other self-starting non-linear regression
@@ -299,36 +380,45 @@
 Michaelis-Menten, logistic and Weibull (in base <font face="Courier New,Courier" color="#666666"><b>R</b></font>) models. The
 function has <code>plot</code> and <code>predict</code> methods.
 </p>
+<p>
 </li>
-<li><p> Self-starting non-linear species accumulation models
+<li>Self-starting non-linear species accumulation models
 <code>SSarrhenius</code>, <code>SSgleason</code>, <code>SSgitay</code> and
 <code>SSlomolino</code>. These can be used with <code>fitspecaccum</code> or
 directly in non-linear regression with <code>nls</code>. These functions
 were implemented because they were found good for species-area
 models by Dengler (<EM>J. Biogeogr.</EM> 36, 728-744; 2009).
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
 
 
 <h4>NEW FEATURES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>adonis</code>, <code>anosim</code>, <code>meandist</code> and
+<li> <code>adonis</code>, <code>anosim</code>, <code>meandist</code> and
 <code>mrpp</code> warn on negative dissimilarities, and
 <code>betadisper</code> refuses to analyse them. All these functions
 expect dissimilarities, and giving something else (like
 correlations) probably is a user error.
 </p>
+<p>
 </li>
-<li> <p><code>betadisper</code> uses restricted permutation of the
+<li><code>betadisper</code> uses restricted permutation of the
 <span class="pkg">permute</span> package. 
 </p>
+<p>
 </li>
-<li> <p><code>metaMDS</code> uses <code>monoMDS</code> as its default ordination
+<li><code>metaMDS</code> uses <code>monoMDS</code> as its default ordination
 engine. Function gains new argument <code>engine</code> that can be used
 to alternatively select <code>MASS::isoMDS</code>.  The default is not
 to use <code>stepacross</code> with <code>monoMDS</code> because its
@@ -337,53 +427,73 @@
 with <code>isoMDS</code> because it cannot handle adequately these tied
 maximum dissimilarities.
 </p>
+<p>
 </li>
-<li> <p><code>specaccum</code> gained <code>predict</code> method which uses
+<li><code>specaccum</code> gained <code>predict</code> method which uses
 either linear or spline interpolation for data between observed
 points. Extrapolation is possible with spline interpolation, but
 may make little sense.
 </p>
+<p>
 </li>
-<li> <p><code>specpool</code> can handle missing values or empty factor
+<li><code>specpool</code> can handle missing values or empty factor
 levels in the grouping factor <code>pool</code>.  Now also checks that
 the length of the <code>pool</code> matches the number of
 observations.
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
+<p>
 
 
 <h4>DEPRECATED AND DEFUNCT</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>metaMDSrotate</code> was replaced with <code>MDSrotate</code>
+<li> <code>metaMDSrotate</code> was replaced with <code>MDSrotate</code>
 that can also handle the results of <code>monoMDS</code>.
 </p>
+<p>
 </li>
-<li> <p><code>permuted.index2</code> and other &ldquo;new&rdquo; permutation
+<li><code>permuted.index2</code> and other &ldquo;new&rdquo; permutation
 code was removed in favour of the <span class="pkg">permute</span> package. This code
 was not intended for normal use, but packages depending on that
 code in <span class="pkg">vegan</span> should instead depend on <span class="pkg">permute</span>.
 </p>
+<p>
 </ul>
   
+</p>
+<p>
+</p>
  
+</p>
+<p>
 
 
 <h4>ANALYSES</h4>
 
+<p>
 
-
+</p>
+<p>
 <ul>
-<li> <p><code>treeheight</code> uses much snappier code. The results
+<li> <code>treeheight</code> uses much snappier code. The results
 should be unchanged.
 </p>
+<p>
 </ul>
 
+</p>
  
+</p>
 
 
 </body></html>



More information about the Vegan-commits mailing list