Performs pairwise multivariate tests (e.g. "Pillai") on levels of a factor in a model fitted by the mvgls
or mvols
function. This is achieved by evaluating all the pairwise contrasts using generalized linear hypothesis tests (see also ?manova.gls).
pairwise.glh(object, term=1, test=c("Pillai", "Wilks", "Hotelling-Lawley", "Roy"),
adjust="holm", nperm=1000L, ...)
An object of class 'pairs.mvgls' which is usually printed. It contains a list including the following components:
the multivariate test statistic used
the contrasts used for all the pairwise tests
the statistic calculated for each pairwise comparisons
the p-values calculated for each pairwise comparisons
the adjusted (for multiple comparisons) p-values calculated for each pairwise comparisons
A model fit obtained by the mvgls
or mvols
function.
The factor term in the "object" model fit on which the pairwise tests should be evaluated.
The multivariate test statistic to compute - "Wilks", "Pillai", "Hotelling-Lawley", or "Roy"
The multiple comparison adjustment. See ?p.adjust
.
The number of permutations used for building the null distribution of the chosen statistic. Permutation is the only available approach for high-dimensional PL models, but either permutations or parametric tests can be used with maximum likelihood (method "LL" in mvgls
and mvols
)
Further arguments to be passed through. (e.g., nbcores=2L
to provide the number of cores used for parallel calculus; parametric=FALSE
to obtain permutation instead of parametric tests for maximum likelihood fit; verbose=TRUE
to display a progress bar during permutations; rhs=0
the "right-hand-side" vector for general linear hypothesis testing. See details)
J. Clavel
pairwise.glh
allows performing multivariate tests (e.g. Pillai's, Wilks, Hotelling-Lawley and Roy largest root) on generalized least squares (GLS) linear model (objects of class "mvgls") fit by either maximum likelihood (method="LL"
) or penalized likelihood (method="PL-LOO"
) using the mvgls
or mvols
function.
General Linear Hypothesis of the form:
$$\bold{LB=O}$$
is used internally with an L matrix specifying linear combinations ("contrasts") of the model coefficients (B) for each pairwise comparisons. The right-hand-side matrix O is a constant matrix (of zeros by default) that can be provided through the argument rhs
(to test specific values for instance).
Permutations on high-dimensional datasets is time consuming. You can use the option nbcores
to parallelize the computations over several cores using forking in UNIX platforms (default is nbcores=1L
). Estimated time to completion is displayed when verbose=TRUE
.
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.
mvgls
,
mvols
,
pairwise.contrasts
,
manova.gls
# \donttest{
data("phyllostomid")
# model fit with mandible~"grp2"
fit <- mvgls(mandible~grp2, data=phyllostomid, phyllostomid$tree, model="lambda", method="PL")
# pairwise tests
pairwise.glh(fit, term="grp2", test="Pillai", adjust="holm", nperm=1000, verbose=TRUE)
# fit the model by ML (p
Run the code above in your browser using DataLab