mvgls.dfa {mvMORPH} | R Documentation |
Discriminant Function Analysis (DFA) - also called Linear Discriminant Analysis (LDA) or Canonical Variate Analysis (CVA) - based on multivariate GLS (or OLS) model fit
Description
Performs a discriminant analysis (DFA) on a regularized variance-covariance matrix obtained using either the mvgls
or mvols
function.
Usage
mvgls.dfa(object, ...)
Arguments
object |
A model fit obtained by the |
... |
Options to be passed through. (e.g., |
Details
mvgls.dfa
allows computing a discriminant analysis based on GLS (or OLS) estimates from a regression model (see mvgls
and mvols
). Discriminant functions can be used for dimensionality reduction, to follow up a MANOVA analysis to describe group separation, or for group prediction.
Value
a list with the following components
coeffs |
a matrix containing the raw discriminants |
coeffs.std |
a matrix containing the standardized discriminants |
scores |
a matrix containing the discriminant scores [residuals X coeffs] |
residuals |
the centered [with GLS or OLS] response variables |
H |
the hypothesis (or between group model matrix) |
E |
the error (or residual model matrix) |
rank |
the rank of |
pct |
the percentage of the discriminant functions |
Note
Still in development, may not handle special designs.
Author(s)
J. Clavel
References
Clavel, J., Aristide, L., Morlon, H., 2019. A Penalized Likelihood framework for high-dimensional phylogenetic comparative methods and an application to new-world monkeys brain evolution. Systematic Biology 68(1): 93-116.
Clavel, J., Morlon, H., 2020. Reliable phylogenetic regressions for multivariate comparative data: illustration with the MANOVA and application to the effect of diet on mandible morphology in Phyllostomid bats. Systematic Biology 69(5): 927-943.
See Also
mvgls
,
mvols
,
manova.gls
,
mvgls.pca
,
predict.mvgls.dfa
,
Examples
library(mvMORPH)
n=64
p=4
tree <- pbtree(n=n)
sigma <- crossprod(matrix(runif(p*p),p,p))
resid <- mvSIM(tree, model="BM1", param=list(sigma=sigma))
Y <- rep(c(0,1.5), each=n/2) + resid
grp <- as.factor(rep(c("gp1","gp2"),each=n/2))
names(grp) = rownames(Y)
data <- list(Y=Y, grp=grp)
mod <- mvgls(Y~grp, data=data, tree=tree, model="BM")
# fda
da1 <- mvgls.dfa(mod)
plot(da1)