effectsize: Multivariate measure of association/effect size for objects...

View source: R/multivariate.stat.r

effectsizeR Documentation

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,...)

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.

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.

Value

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

Note

This function is still under development.

Author(s)

Julien Clavel

See Also

manova.gls mvgls mvols pairwise.glh

Examples

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)

mvMORPH documentation built on March 31, 2023, 6:25 p.m.