Description Usage Format Examples
A psychological study consisting of four tests was conducted on males and females group and the results were noted. Since the four tests are correlated and each one is noted for all the individuals, one is interested to know if the mean vector of the test scores is same across the gender group.
1 |
A data frame with 32 observations on the following 8 variables.
M_y1
pictorial inconsistencies for males
M_y2
paper form board test for males
M_y3
tool recognition test for males
M_y4
vocabulary test for males
F_y1
pictorial inconsistencies for females
F_y2
paper form board test for females
F_y3
tool recognition test for females
F_y4
vocabulary test for females
1 2 3 4 5 6 7 8 9 10 11 | data(mfp)
males <- mfp[,1:4]; females <- mfp[,5:8]
nm <- nrow(males);nf <- nrow(females)
p <- 4; k <- 2
vm <- nm-1; vf <- nf-1
meanm <- colMeans(males); meanf <- colMeans(females)
sigmam <- var(males); sigmaf <- var(females)
sigmapl <- (1/(nm+nf-2))*((nm-1)*sigmam+(nf-1)*sigmaf)
ln_M <- .5*(vm*log(det(sigmam))+vf*log(det(sigmaf))) -.5*(vm+vf)*log(det(sigmapl))
exact_test <- -2*ln_M # the Exact Test
exact_test
|
[1] 14.5606
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.