[Vegan-commits] r2421 - in branches/2.0: R inst inst/doc man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Feb 7 18:55:39 CET 2013


Author: jarioksa
Date: 2013-02-07 18:55:39 +0100 (Thu, 07 Feb 2013)
New Revision: 2421

Modified:
   branches/2.0/R/fitted.capscale.R
   branches/2.0/R/fitted.cca.R
   branches/2.0/R/fitted.rda.R
   branches/2.0/R/predict.cca.R
   branches/2.0/R/predict.rda.R
   branches/2.0/inst/ChangeLog
   branches/2.0/inst/doc/FAQ-vegan.texi
   branches/2.0/man/capscale.Rd
   branches/2.0/man/cca.Rd
   branches/2.0/man/cca.object.Rd
   branches/2.0/man/predict.cca.Rd
   branches/2.0/man/procrustes.Rd
Log:
selected merges in 2389:2420. Mainly predict.cca/fitted.cca etc and doc upgrades (FAQ, cca x-refs)

Modified: branches/2.0/R/fitted.capscale.R
===================================================================
--- branches/2.0/R/fitted.capscale.R	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/R/fitted.capscale.R	2013-02-07 17:55:39 UTC (rev 2421)
@@ -1,5 +1,5 @@
-fitted.capscale <-
-    function(object, model = c("CCA", "CA", "Imaginary"),
+`fitted.capscale` <-
+    function(object, model = c("CCA", "CA", "pCCA", "Imaginary"),
              type = c("response", "working"), ...)
 {
     model <- match.arg(model)
@@ -8,7 +8,8 @@
     U <- switch(model,
                 CCA = object$CCA$u.eig,
                 CA = object$CA$u.eig,
-                Imaginary = object$CA$imaginary.u.eig)
+                Imaginary = object$CA$imaginary.u.eig,
+                pCCA = object$pCCA$Fit/object$adjust)
     ## Distances or working scores U
     if (type == "response") {
         U <- dist(U)

Modified: branches/2.0/R/fitted.cca.R
===================================================================
--- branches/2.0/R/fitted.cca.R	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/R/fitted.cca.R	2013-02-07 17:55:39 UTC (rev 2421)
@@ -1,11 +1,15 @@
-"fitted.cca" <-
-function (object, model = c("CCA","CA"), type = c("response", "working"), ...) 
+`fitted.cca` <-
+    function (object, model = c("CCA","CA","pCCA"), type = c("response", "working"),
+              ...) 
 {
     type <- match.arg(type)
     model <- match.arg(model)
     gtot <- object$grand.total
     rc <- object$rowsum %o% object$colsum
-    Xbar <- object[[model]]$Xbar
+    if (model == "pCCA")
+        Xbar <- object$pCCA$Fit
+    else
+        Xbar <- object[[model]]$Xbar
     if (model == "CCA")
         Xbar <- qr.fitted(object$CCA$QR, Xbar)
     if (type == "response")

Modified: branches/2.0/R/fitted.rda.R
===================================================================
--- branches/2.0/R/fitted.rda.R	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/R/fitted.rda.R	2013-02-07 17:55:39 UTC (rev 2421)
@@ -1,9 +1,12 @@
-"fitted.rda" <-
-    function (object, model = c("CCA", "CA"), type = c("response", "working"), ...) 
+`fitted.rda` <-
+    function (object, model = c("CCA", "CA", "pCCA"), type = c("response", "working"), ...) 
 {
     type <- match.arg(type)
     model <- match.arg(model)
-    Xbar <- object[[model]]$Xbar
+    if (model == "pCCA")
+        Xbar <- object$pCCA$Fit
+    else
+        Xbar <- object[[model]]$Xbar
     if (model == "CCA") 
         Xbar <- qr.fitted(object$CCA$QR, Xbar)
     if (type == "response") {

Modified: branches/2.0/R/predict.cca.R
===================================================================
--- branches/2.0/R/predict.cca.R	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/R/predict.cca.R	2013-02-07 17:55:39 UTC (rev 2421)
@@ -31,8 +31,6 @@
         }
         if (take > 0) 
             Xbar <- u %*% slam %*% t(v)
-        if (!is.null(object$pCCA)) 
-            warning("Conditional ('partial') component ignored")
         rc <- outer(rs, cs)
         if (type == "response") 
             out <- (Xbar + 1) * rc * gtot

Modified: branches/2.0/R/predict.rda.R
===================================================================
--- branches/2.0/R/predict.rda.R	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/R/predict.rda.R	2013-02-07 17:55:39 UTC (rev 2421)
@@ -25,15 +25,13 @@
         w <- u
     slam <- diag(sqrt(object[[model]]$eig[1:take] * nr), nrow = take)
     if (type %in% c("response", "working")) {
-        if (!is.null(object$pCCA)) 
-            warning("Conditional ('partial') component ignored")
         if (!missing(newdata)) {
             u <- predict(object, type = if(model == "CCA") "lc" else "wa",
                          newdata = newdata, rank = take)
         }
         if (inherits(object, "capscale")) {
             if (take > 0) {
-                out <- u %*% slam/sqrt(nr)
+                out <- u %*% slam/object$adjust
                 if (type == "response") {
                     out <- dist(out)
                     if (!is.null(object$ac))

Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/inst/ChangeLog	2013-02-07 17:55:39 UTC (rev 2421)
@@ -4,15 +4,19 @@
 
 Version 2.0-6 (opened October 8, 2012)
 
-	* merge 2404: refer Legendre & Legendre for the vegan rda
-	algorithm. 
+	* merge 2420: cca cross references.
+	* merge 2417 thru 2419: predict & fitted upgraded for cca etc.  
+	* merge 2414: adjustment in predict.capscale.
+	* merge 2408: FAQ on random effects in cca etc.
+	* merge 2404,2411: refer Legendre & Legendre for the vegan rda
+	algorithm.
 	* merge 2934 (partial, mc): oecosimu handles nestedfun() returning
 	data.frame. Not merged: checking length of statistic when setting
 	its name.
 	* merge 2932,3: matching names in treedive() and treedist().
-	* merge 2388 (partial): faster protest, the part of evaluating the
-	test statistic hand crafted, because parallelizations caused
-	conflicts here.
+	* merge 2388 (partial), 2389, 2390: faster protest, the part of
+	evaluating the test statistic hand crafted, because
+	parallelizations caused conflicts here.
 	* merge 2385, 7: protest print, faster sum of squares in procrustes. 
 	* merge 2384: new FAQ entries.
 	* merge 2383: remove alias to print.wcmdscale.

Modified: branches/2.0/inst/doc/FAQ-vegan.texi
===================================================================
--- branches/2.0/inst/doc/FAQ-vegan.texi	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/inst/doc/FAQ-vegan.texi	2013-02-07 17:55:39 UTC (rev 2421)
@@ -8,7 +8,7 @@
 @setfilename FAQ- at pkg{vegan}.info
 @settitle @pkg{vegan} FAQ
 @setchapternewpage on
- at set FAQ_YEAR 2012
+ at set FAQ_YEAR 2013
 @afourpaper
 @c %**end of header
 
@@ -26,7 +26,7 @@
 Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
 California, 94105, USA.
 
-Copyright @copyright{} 2008-2012 Jari Oksanen
+Copyright @copyright{} 2008-2013 Jari Oksanen
 @end quotation
 @end copying
 
@@ -324,7 +324,7 @@
 @chapter Ordination
 
 @menu
-* I have only numeric and positive data but @pkg{vegan} still complaints::  
+* I have only numeric and positive data but @pkg{vegan} still complains::  
 * Can I analyse binary or cover class data?::  
 * Why dissimilarities in @pkg{vegan} differ from other sources?::  
 * Why NMDS stress is sometimes 0.1 and sometimes 10?::  
@@ -335,6 +335,7 @@
 * How the RDA results are scaled?::  
 * cca fails with ``data.frame expected'' or ``"site.env" missing''::  
 * Variance explained by ordination axes::  
+* Can I have random effects in constrained ordination or in @code{adonis}?::  
 * Is it possible to have passive points in ordination?::  
 * Class variables and dummies::  
 * How are environmental arrows scaled?::  
@@ -348,9 +349,9 @@
 * Can I zoom into an ordination plot?::  
 @end menu
 
- at node  I have only numeric and positive data but @pkg{vegan} still complaints, Can I analyse binary or cover class data?, Ordination, Ordination
+ at node  I have only numeric and positive data but @pkg{vegan} still complains, Can I analyse binary or cover class data?, Ordination, Ordination
 @comment  node-name,  next,  previous,  up
- at section I have only numeric and positive data but @pkg{vegan} still complaints
+ at section I have only numeric and positive data but @pkg{vegan} still complains
 
 You are wrong! Computers are painfully pedantic, and if they find
 non-numeric or negative data entries, you really have them. Check your
@@ -361,7 +362,7 @@
 the data). Another common reason is that you had empty cells in your
 input data, and these were interpreted as missing values.
 
- at node Can I analyse binary or cover class data?, Why dissimilarities in @pkg{vegan} differ from other sources?, I have only numeric and positive data but @pkg{vegan} still complaints, Ordination
+ at node Can I analyse binary or cover class data?, Why dissimilarities in @pkg{vegan} differ from other sources?, I have only numeric and positive data but @pkg{vegan} still complains, Ordination
 @section Can I analyse binary or cover class data?
 
 Yes. Most @pkg{vegan} methods can handle binary data or cover abundance data.
@@ -488,7 +489,7 @@
 you do not need package @pkg{ade4}, you can detach it with command
 @code{detach(package:ade4)}.
 
- at node Variance explained by ordination axes, Is it possible to have passive points in ordination?, cca fails with ``data.frame expected'' or ``"site.env" missing'', Ordination
+ at node Variance explained by ordination axes, Can I have random effects in constrained ordination or in @code{adonis}?, cca fails with ``data.frame expected'' or ``"site.env" missing'', Ordination
 @section Variance explained by ordination axes.
 
 In general, @pkg{vegan} does not directly give any statistics on the
@@ -547,7 +548,46 @@
 
 @end itemize
 
- at node Is it possible to have passive points in ordination?, Class variables and dummies, Variance explained by ordination axes, Ordination
+ at node Can I have random effects in constrained ordination or in @code{adonis}?, Is it possible to have passive points in ordination?, Variance explained by ordination axes, Ordination
+ at section Can I have random effects in constrained ordination or in @code{adonis}?
+
+No. Strictly speaking, this is impossible. However, you can define
+models that respond to similar goals as random effects models, although
+they strictly speaking use only fixed effects.
+
+Constrained ordination functions @code{cca}, @code{rda} and
+ at code{capscale} can have @code{Condition()} terms in their formula. The
+ at code{Condition()} define partial terms that are fitted before other
+constraints and can be used to remove the effects of background
+variables, and their contribution to decomposing inertia (variance) is
+reported separately.  These partial terms are often regarded as similar
+to random effects, but they are still fitted in the same way as other
+terms and strictly speaking they are fixed terms.
+
+Function @code{adonis} evaluates terms sequentially. In a model with
+right-hand-side @code{~ A + B} the effects of @code{A} are evaluated
+first, and the effects of @code{B} after removing the effects of
+ at code{A}. Sequential tests are also available in @code{anova} function
+for constrained ordination results by setting argument @code{by = "term"}.  
+In this way, the first terms can serve in a similar role as
+random effects, although they are fitted in the same way as all other
+terms, and strictly speaking they are fixed terms.
+
+The permutation tests can usually have a @code{strata} argument which
+restricts the permutations within levels of a factor given in the
+argument. This can be used to restrict the permutations within levels of
+factor regarded as a random term.  More structured permutations are
+available with the @pkg{permute} package.
+
+A major reason why real random effects models are impossible in most
+ at pkg{vegan} functions is that their tests are based on the permutation
+of the data. The data are given, that is fixed, and therefore
+permutation tests are basically tests of fixed terms on fixed data.
+Random effect terms would require permutations of data with a random
+component instead of the given, fixed data, and such tests are not
+available in @pkg{vegan}.
+
+ at node Is it possible to have passive points in ordination?, Class variables and dummies, Can I have random effects in constrained ordination or in @code{adonis}?, Ordination
 @section Is it possible to have passive points in ordination?
 
 @pkg{Vegan} does not have a concept of passive points, or a point that should

Modified: branches/2.0/man/capscale.Rd
===================================================================
--- branches/2.0/man/capscale.Rd	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/man/capscale.Rd	2013-02-07 17:55:39 UTC (rev 2421)
@@ -213,7 +213,14 @@
 
 \seealso{\code{\link{rda}}, \code{\link{cca}}, \code{\link{plot.cca}},
   \code{\link{anova.cca}}, \code{\link{vegdist}},
-  \code{\link{dist}}, \code{\link{cmdscale}}.}
+  \code{\link{dist}}, \code{\link{cmdscale}}.
+
+  The function returns similar result object as \code{\link{rda}} (see
+  \code{\link{cca.object}}). This section for \code{\link{rda}} gives a
+  more complete list of functions that can be used to access and
+  analyse \code{capscale} results.
+
+}
 \examples{
 data(varespec)
 data(varechem)

Modified: branches/2.0/man/cca.Rd
===================================================================
--- branches/2.0/man/cca.Rd	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/man/cca.Rd	2013-02-07 17:55:39 UTC (rev 2421)
@@ -67,7 +67,7 @@
   decomposition (\code{\link{svd}}). Function \code{rda} is similar, but uses
   ordinary, unweighted linear regression and unweighted SVD. Legendre &
   Legendre (2012), Table 11.5 (p. 650) give a skeleton of the RDA
-  algorithm of \pgk{vegan}. The algorithm of CCA is similar, but
+  algorithm of \pkg{vegan}. The algorithm of CCA is similar, but
   involves standardization by row and column weights.
 
   The functions can be called either with matrix-like entries for community
@@ -194,25 +194,61 @@
 }
 
 \seealso{
-  There is a special documentation for \code{\link{plot.cca}} and
-  \code{\link{summary.cca}} functions
-  with their helper functions (\code{\link{text.cca}},
-  \code{\link{points.cca}}, \code{\link{scores.cca}}).
-  Function \code{\link{anova.cca}} provides an ANOVA like permutation
-  test for the ``significance'' of constraints. Automatic model building
-  (dangerous!) is discussed in \code{\link{deviance.cca}}.  Diagnostic
-  tools, prediction and adding new points in ordination are discussed in
-  \code{\link{goodness.cca}} and \code{\link{predict.cca}}.
-  Function  \code{\link[ade4]{cca}} (library \pkg{ade4}) provide alternative
-  implementations of CCA (these are internally quite
-  different). Function \code{\link{capscale}} is a non-Euclidean generalization of
-  \code{rda}. The result object is described in
-  \code{\link{cca.object}}.
-  You can use \code{\link{as.mlm}} to refit ordination result as a
-  multiple response linear model to find some descriptive statistics.
-  Design decisions are explained in
-  \code{\link{vignette}} \file{decision-vegan} which also can be accessed
-  with \code{\link{vegandocs}}.  
+  
+  This help page describes two constrained ordination functions,
+  \code{cca} and \code{rda}.  A related method, distance-based
+  redundancy analysis (dbRDA) is described separately
+  (\code{\link{capscale}}). All these function return similar objects
+  (described in \code{\link{cca.object}}). There are numerous support
+  functions that can used to access the result object. In the list
+  below, functions of type \code{cca} will handle all ordination
+  objects, and functions of \code{rda} only handle \code{rda} and
+  \code{\link{capscale}} results.
+
+  The main plotting functions are \code{\link{plot.cca}} for all
+  methods, and \code{\link{biplot.rda}} for RDA and dbRDA.  However,
+  generic \pkg{vegan} plotting functions can also handle the results.
+  The scores can be accessed and scaled with \code{\link{scores.cca}},
+  and summarized with \code{\link{summary.cca}}. The eigenvalues can
+  be accessed with \code{\link{eigenvals.cca}} and the regression
+  coefficients for constraints with \code{\link{coef.cca}}.  The
+  eigenvalues can be plotted with \code{\link{screeplot.cca}}, and the
+  (adjusted) \eqn{R^2}{R-squared} can be found with
+  \code{\link{RsquareAdj.rda}}. The scores can be also calculated for
+  new data sets with \code{\link{predict.cca}} which allows adding
+  points to ordinations.  The values of constraints can be inferred
+  from ordination and community composition with
+  \code{\link{calibrate.cca}}.
+
+  Diagnostic statistics can be found with \code{\link{goodness.cca}},
+  \code{\link{inertcomp}}, \code{\link{spenvcor}},
+  \code{\link{intersetcor}} and \code{\link{vif.cca}}.  Function
+  \code{\link{as.mlm.cca}} refits the result object as a multiple
+  \code{\link{lm}} object, and this allows finding influence
+  statistics (\code{\link{lm.influence}}, \code{\link{cooks.distance}}
+  etc.).
+  
+  Permutation based signficance for the overall model, single
+  constraining variables or axes can be found with
+  \code{\link{anova.cca}}.  Automatic model building with \R{}
+  \code{\link{step}} function is possible with
+  \code{\link{deviance.cca}}, \code{\link{add1.cca}} and
+  \code{\link{drop1.cca}}.  Functions \code{\link{ordistep}} and
+  \code{\link{ordiR2step}} (for RDA) are special functions for
+  constrained ordination. Randomized data sets can be generated with
+  \code{\link{simulate.cca}}.
+
+  Separate methods based on constrained ordination model are principal
+  response curves (\code{\link{prc}}) and variance partioning between
+  several components (\code{\link{varpart}}).
+
+  Design decisions are explained in \code{\link{vignette}}
+  \file{decision-vegan} which also can be accessed with
+  \code{\link{vegandocs}}.
+
+  Package \pkg{ade4} provides alternative constrained ordination
+  functions \code{\link[ade4]{cca}} and \code{\link[ade4]{pcaiv}}.
+
 }
 
 \examples{

Modified: branches/2.0/man/cca.object.Rd
===================================================================
--- branches/2.0/man/cca.object.Rd	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/man/cca.object.Rd	2013-02-07 17:55:39 UTC (rev 2421)
@@ -190,6 +190,10 @@
   linear model (\code{\link{lm}}) in order to more easily find some
   statistics (which in principle could be directly found from the
   \code{cca.object} as well). 
+
+  This section in \code{\link{cca}} gives a more complete list of
+  methods to handle the constrained ordination result object.
+
 }
 \references{
   Legendre, P. and Legendre, L. (2012) \emph{Numerical Ecology}. 3rd English

Modified: branches/2.0/man/predict.cca.Rd
===================================================================
--- branches/2.0/man/predict.cca.Rd	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/man/predict.cca.Rd	2013-02-07 17:55:39 UTC (rev 2421)
@@ -21,9 +21,9 @@
   response data. 
 }
 \usage{
-\method{fitted}{cca}(object, model = c("CCA", "CA"),
+\method{fitted}{cca}(object, model = c("CCA", "CA", "pCCA"),
     type =  c("response", "working"), ...)
-\method{fitted}{capscale}(object, model = c("CCA", "CA", "Imaginary"),
+\method{fitted}{capscale}(object, model = c("CCA", "CA", "pCCA", "Imaginary"),
     type = c("response", "working"), ...)
 \method{residuals}{cca}(object, ...)
 \method{predict}{cca}(object, newdata, type = c("response", "wa", "sp", "lc", "working"),
@@ -37,24 +37,23 @@
 \arguments{
   \item{object}{A result object from \code{\link{cca}},
     \code{\link{rda}}, \code{\link{capscale}} or \code{\link{decorana}}. }
-  \item{model}{Show constrained (\code{"CCA"}) or unconstrained
-    (\code{"CA"}) results. For \code{\link{capscale}} this can also be 
-    \code{"Imaginary"} for imaginary components with negative
-    eigenvalues. }
-  
+  \item{model}{Show constrained (\code{"CCA"}), unconstrained
+    (\code{"CA"}) or conditioned \dQuote{partial} (\code{"pCCA"})
+    results. For \code{fitted} method of \code{\link{capscale}} this
+    can also be \code{"Imaginary"} for imaginary components with
+    negative eigenvalues. }
   \item{newdata}{New data frame to be used in prediction or in
     calibration.  Usually this a new community data frame, but with
-    \code{type = "lc"} and for constrained component with 
-    \code{type = "response"} and \code{type = "working"} it must be a 
-    data frame.  The \code{newdata} must have the same number of rows as
-    the original community data for a \code{\link{cca}} result with
+    \code{type = "lc"} and for constrained component with \code{type =
+    "response"} and \code{type = "working"} it must be a data frame of
+    constraints.  The \code{newdata} must have the same number of rows
+    as the original community data for a \code{\link{cca}} result with
     \code{type = "response"} or \code{type = "working"}.  If the
     original model had row or column names, then new data must contain
     rows or columns with the same names (row names for species scores,
     column names for \code{"wa"} scores and constraint names of
     \code{"lc"} scores). In other cases the rows or columns must match
     directly. }
-
   \item{type}{The type of prediction, fitted values or residuals:
     \code{"response"} scales results so that the same ordination gives
     the same results, and \code{"working"} gives the values used
@@ -71,28 +70,28 @@
   \item{rank}{The rank or the number of axes used in the approximation.
     The default is to use all axes (full rank) of the \code{"model"} or
     all available four axes in \code{predict.decorana}.}
-  \item{scaling}{Scaling or predicted scores
-  with the same  meaning as in \code{\link{cca}}, \code{\link{rda}} and
-  \code{\link{capscale}}.}
+  \item{scaling}{Scaling or predicted scores with the same meaning as
+    in \code{\link{cca}}, \code{\link{rda}} and
+    \code{\link{capscale}}.}
   \item{\dots}{Other parameters to the functions.}
 }
 \details{
+
   Function \code{fitted} gives the approximation of the original data
-  matrix or dissimilarities from the ordination result either in the 
-  scale of the response
-  or as scaled internally by the function.  Function \code{residuals} gives
-  the approximation of the original data from the unconstrained
-  ordination.  With argument \code{type = "response"} the
-  \code{fitted.cca} and \code{residuals.cca} function 
+  matrix or dissimilarities from the ordination result either in the
+  scale of the response or as scaled internally by the function.
+  Function \code{residuals} gives the approximation of the original
+  data from the unconstrained ordination.  With argument \code{type =
+  "response"} the \code{fitted.cca} and \code{residuals.cca} function
   both give the same marginal totals as the original data matrix, and
-  their entries do not add up to the original data. 
-  Functions \code{fitted.capscale} and \code{residuals.capscale} give the
-  dissimilarities with \code{type = "response"}, but these are not additive,
-  but the \code{"working"} scores are additive. 
-  All variants of \code{fitted} and \code{residuals} are defined so
-  that for model \code{mod <- cca(y ~ x)}, \code{cca(fitted(mod))} is equal
-  to constrained ordination, and \code{cca(residuals(mod))} is equal to
-  unconstrained part of the ordination.
+  fitted and residuals do not add up to the original data.  Functions
+  \code{fitted.capscale} and \code{residuals.capscale} give the
+  dissimilarities with \code{type = "response"}, but these are not
+  additive, but the \code{"working"} scores are additive.  All
+  variants of \code{fitted} and \code{residuals} are defined so that
+  for model \code{mod <- cca(y ~ x)}, \code{cca(fitted(mod))} is equal
+  to constrained ordination, and \code{cca(residuals(mod))} is equal
+  to unconstrained part of the ordination.  
 
   Function \code{predict} can find the estimate of the original data
   matrix or dissimilarities (\code{type = "response"}) with any rank.
@@ -105,8 +104,8 @@
   explicit \code{scaling} to add those scores to ordination
   diagrams. With \code{type = "wa"} the function finds the site scores
   from species scores. In that case, the new data can contain new sites,
-  but species must match in the original and new data.  With \code{type
-  = "sp"} the function finds species scores from site constraints
+  but species must match in the original and new data.  With \code{type="sp"} 
+  the function finds species scores from site constraints
   (linear combination scores). In that case the new data can contain new
   species, but sites must match in the original and new data. With
   \code{type = "lc"} the function finds the linear combination scores
@@ -117,7 +116,7 @@
   if constrained component is desired, and community data matrix if
   residual or unconstrained component is desired.  With these types, the
   function uses \code{newdata} to find new \code{"lc"} (constrained) or
-  \code{"wa"} scores (unconstrained) and then finding the response or
+  \code{"wa"} scores (unconstrained) and then finds the response or
   working data from these new row scores and species scores.  The
   original site (row) and species (column) weights are used for
   \code{type = "response"} and \code{type = "working"} in correspondence
@@ -127,7 +126,7 @@
   If a completely new data frame is created, extreme care is needed
   defining variables similarly as in the original model, in particular
   with (ordered) factors. If ordination was performed with the formula
-  interface, the \code{newdata} also can be a data frame or matrix, but
+  interface, the \code{newdata} can be a data frame or matrix, but
   extreme care is needed that the columns match in the original and
   \code{newdata}.
 
@@ -139,7 +138,7 @@
   arrows, but it uses regression coefficients.  The function can be called
   with \code{newdata} so that cross-validation is possible.  The
   \code{newdata} may contain new sites, but species must match in the
-  original and new data  The function
+  original and new data.  The function
   does not work with \sQuote{partial} models with \code{Condition} term,
   and it cannot be used with \code{newdata} for \code{\link{capscale}}
   results.  The results may only be interpretable for continuous variables.

Modified: branches/2.0/man/procrustes.Rd
===================================================================
--- branches/2.0/man/procrustes.Rd	2013-02-07 17:39:54 UTC (rev 2420)
+++ branches/2.0/man/procrustes.Rd	2013-02-07 17:55:39 UTC (rev 2421)
@@ -135,15 +135,16 @@
   function canot be used with \code{newdata} for \code{symmetric}
   analysis.
 
-  Function \code{protest} calls \code{procrustes(..., symmetric = TRUE)}
+  Function \code{protest} performs symmetric Procrustes analysis
   repeatedly to estimate the `significance' of the Procrustes
   statistic. Function \code{protest} uses a correlation-like statistic
   derived from the symmetric Procrustes sum of squares \eqn{ss} as
-  \eqn{r =\sqrt{(1-ss)}}, and sometimes called \eqn{m_{12}}. Function
-  \code{protest} has own \code{print} method, but otherwise uses
-  \code{procrustes} methods. Thus \code{plot} with a \code{protest} object
-  yields a ``Procrustean superimposition plot.''
-}
+  \eqn{r =\sqrt{1-ss}}{r = sqrt(1-ss)}, and also prints the sum of
+  squares of the symmetric analysis, sometimes called
+  \eqn{m_{12}^2}{squared m12}. Function \code{protest} has own
+  \code{print} method, but otherwise uses \code{procrustes}
+  methods. Thus \code{plot} with a \code{protest} object yields a
+  ``Procrustean superimposition plot.''  }
 
 \value{
   Function \code{procrustes} returns an object of class



More information about the Vegan-commits mailing list