Learn R Programming

mvMORPH (version 1.2.1)

effectsize: Multivariate measure of association/effect size for objects of class "manova.gls"

Description

This function estimate the multivariate effectsize for all the outcomes variables of a multivariate analysis of variance

Usage

effectsize(x,...)

Value

Return the effect size for all the terms of the MANOVA or pairwise tests.

Arguments

x

An object of class "manova.gls"

...

One can specify adjusted=TRUE to obtain Serlin' adjustment to Pillai trace effect size, or Tatsuoka' adjustment for Wilks' lambda. These adjustments are correcting positive bias with increasing number of variables.

Author

Julien Clavel

Details

This function allows estimating multivariate effect size for the four multivariate statistics implemented in manova.gls (Pillai, Wilks, Roy, Hotelling-Lawley). For models fit by PL, a multivariate measure of effect size is estimated from the permuted data. Interpret only relatively.

See Also

manova.gls mvgls mvols pairwise.glh

Examples

Run this code
set.seed(123)
n <- 32 # number of species
p <- 3  # number of traits
tree <- pbtree(n=n) # phylogenetic tree
R <- crossprod(matrix(runif(p*p),p))  # a random symmetric matrix (covariance)

# simulate a dataset
Y <- mvSIM(tree, model="BM1", nsim=1, param=list(sigma=R))
X <- rnorm(n) # continuous
grp <- rep(1:2, each=n/2)
dataset <- list(y=Y, x=X, grp=as.factor(grp))

# Model fit
model1 <- mvgls(y~x+grp, data=dataset, tree=tree, model="BM", method="LL")

# Multivariate test
(multivariate_test <- manova.gls(model1, test="Pillai"))
effectsize(multivariate_test)

Run the code above in your browser using DataLab