coef.dcca {douconca} | R Documentation |
Coefficients of double-constrained correspondence analysis (dc-CA)
Description
Fourth-corner coefficients and regression coefficients (of full or reduced rank) to predict traits from environment, environment from traits and response from trait and environment data.
Usage
## S3 method for class 'dcca'
coef(
object,
...,
type = c("fourth_corner", "all_reg", "env2traits_reg", "traits2env_reg"),
rank = "full",
normed = TRUE
)
Arguments
object |
return value of |
... |
Other arguments passed to the function (currently ignored). |
type |
type of coefficients,
|
rank |
rank (number of axes to use). Default "full" for all axes (no rank-reduction). |
normed |
logical (default |
Details
Regression coefficients are for standardized traits and environmental variables.
With covariates, coef()
gives partialfourth-corner correlations.
With rank = 2
, coef()
gives the two-dimensional approximation
of the full-rank fourth-corner correlations in the biplot that displays the
traits and environmental variables at arrow heads or points
at scores(mod, display = c("bp", "bp_traits"))
.
Value
a matrix with coefficients. The exact content of the matrix
depends on the type
of coefficient that is asked for.
Regression coefficients for a response variable
are usually column-vectors.
With X the matrix of units-by-predictors
and B the matrix of predictors-by-response-variables,
predictions or fits are of the form Y = XB.
Analogously, type = "trait2env"
gives a trait-by-environment matrix and
type = "env2traits"
gives an environment-by-trait matrix.
Examples
data("dune_trait_env")
# rownames are carried forward in results
rownames(dune_trait_env$comm) <- dune_trait_env$comm$Sites
mod <- dc_CA(formulaEnv = ~ A1 + Moist + Mag + Use + Condition(Manure),
formulaTraits = ~ SLA + Height + LDMC + Condition(Seedmass) + Lifespan,
response = dune_trait_env$comm[, -1], # must delete "Sites"
dataEnv = dune_trait_env$envir,
dataTraits = dune_trait_env$traits,
verbose = FALSE)
# regression coefficients
coef(mod, type = "env2traits")
coef(mod, type = "traits2env")
coef(mod, type = "fourth")
coef(mod, type = "all_reg")