View source: R/multivariate.stat.r
effectsize | R Documentation |
This function estimate the multivariate effectsize for all the outcomes variables of a multivariate analysis of variance
effectsize(x,...)
x |
An object of class "manova.gls" |
... |
One can specify |
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.
Return the effect size for all the terms of the MANOVA or pairwise tests.
This function is still under development.
Julien Clavel
manova.gls
mvgls
mvols
pairwise.glh
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.