# mfp: Psychological Tests for Males and Females In ACSWR: A Companion Package for the Book "A Course in Statistics with R"

## 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

 `1` ```data(mfp) ```

## 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

 ``` 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 ```

### Example output

```[1] 14.5606
```

ACSWR documentation built on May 2, 2019, 6:53 a.m.