Description Usage Arguments Value See Also Examples
Performs multiparameter tests on GMPM objects (or matrices) using Mahalanobis distances calculated on the permutation matrix.
1 | mdTest(x, y)
|
x |
Either a |
y |
Either a list of vectors, or a single vector. The vector
(or vectors) should index the columns of the matrix on which to
perform the test. They can either be numeric indices or the names
of the matrix columns. If |
A Mdtest
object
S4 classes Mdtest
,
GMPM
, and function gmpm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # create a within-subjects design
# we are interested in main effect of A (3-level variable)
# this requires a multivariate test
df1 <- data.frame(SubjID=rep(1:12,each=6),
A=rep(c("Aa","Ab","Ac"),each=2),
B=c("Ba","Bb"))
df1$Y <- rep(c(0,1,-1),each=2) + rnorm(72)
# parametric analysis
summary(aov(Y ~ A*B + Error(SubjID), df1))
# randomization analysis; should increase maxruns to something like 999
df1.gmpm <- gmpm(Y ~ A*B | SubjID, gaussian, df1, c("A","B"),
gmpmControl=list(maxruns=99))
# retrieve the permutation matrix
pmx <- getPermMx(df1.gmpm)[["within"]]
# perform test using permutation matrix
mdTest(pmx, c("A1","A2"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.