[Vegan-commits] r1258 - in pkg/vegan: inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Aug 17 12:49:25 CEST 2010
Author: jarioksa
Date: 2010-08-17 12:49:25 +0200 (Tue, 17 Aug 2010)
New Revision: 1258
Modified:
pkg/vegan/inst/ChangeLog
pkg/vegan/man/predict.cca.Rd
Log:
document predict.cca(, type=response) with 'newdata'
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-08-17 07:56:05 UTC (rev 1257)
+++ pkg/vegan/inst/ChangeLog 2010-08-17 10:49:25 UTC (rev 1258)
@@ -24,6 +24,10 @@
visible in rendering text (accented letters, Latex notation in
wrong places).
+ * predict.rda/cca: document 'newdata' with 'type = "response"' or
+ 'type = "working"'. The feature was added in vegan
+ 1.18-4 (rev1180, April 15, 2010).
+
Version 1.18-8 (closed August 12, 2010)
* DESCRIPTION: does not suggest package 'ellipse'.
Modified: pkg/vegan/man/predict.cca.Rd
===================================================================
--- pkg/vegan/man/predict.cca.Rd 2010-08-17 07:56:05 UTC (rev 1257)
+++ pkg/vegan/man/predict.cca.Rd 2010-08-17 10:49:25 UTC (rev 1258)
@@ -15,8 +15,11 @@
\title{Prediction Tools for [Constrained] Ordination (CCA,
RDA, DCA, CA, PCA) }
\description{
- Function \code{predict} can be used to find site and species scores
- with new data sets.
+ Function \code{predict} can be used to find site and species scores or
+ estimates of the response data with new data sets, Function
+ \code{calibrate} estimates values of constraints with new data set.
+ Functions \code{fitted} and \code{residuals} return estimates of
+ response data.
}
\usage{
\method{fitted}{cca}(object, model = c("CCA", "CA"),
@@ -38,15 +41,15 @@
\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{newdata}{New data frame to be used in prediction of species
- and site scores or for calibration. Usually this a new community
- data frame, but for \code{predict.cca} \code{type = "lc"} it must
- be an environment data frame, and for \code{type = "response"}
- this is ignored. 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{newdata}{New data frame to be used in prediction or in
+ calibration. Usually this a new community data frame, but for
+ \code{predict.cca} \code{type = "lc"} and for constrained component
+ with \code{type} \code{"response"} and \code{"working"} it must be
+ an environment data frame, 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
@@ -87,32 +90,38 @@
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.
- With \code{rank = "full"} it is identical to \code{fitted}.
- In addition, the function
- can find the species scores or site scores from the community data
- matrix for \code{\link{cca}} or \code{\link{rda}}.
- The function can be used with new data, and it can be used to
- add new species or site scores to existing ordinations. The function
- returns (weighted) orthonormal scores by default, and you must
- specify 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 (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 for sites from environmental data. In that case the
- new data frame must contain all constraining and conditioning environmental
- variables of the model formula. 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 extreme care is needed that the columns
- match in the original and \code{newdata}.
+ matrix or dissimilarities (\code{type = "response"}) with any rank.
+ With \code{rank = "full"} it is identical to \code{fitted}. In
+ addition, the function can find the species scores or site scores from
+ the community data matrix for \code{\link{cca}} or \code{\link{rda}}.
+ The function can be used with new data, and it can be used to add new
+ species or site scores to existing ordinations. The function returns
+ (weighted) orthonormal scores by default, and you must specify
+ 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
+ (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
+ for sites from environmental data. In that case the new data frame
+ must contain all constraining and conditioning environmental variables
+ of the model formula. With \code{type = "response"} or \code{type =
+ "working"} the new data must contain envinronmental variables 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
+ working data from these new row scores and species scores.
+ 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
+ extreme care is needed that the columns match in the original and
+ \code{newdata}.
+
Function \code{calibrate.cca} finds estimates of constraints from
community ordination or \code{"wa"} scores from \code{\link{cca}},
\code{\link{rda}} and \code{\link{capscale}}. This is often known as
More information about the Vegan-commits
mailing list