Learn R Programming

ACSWR (version 1.0)

mfp: Psychological Tests for Males and Females

Description

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.

Usage

data(mfp)

Arguments

Format

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

Examples

Run this code
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

Run the code above in your browser using DataLab