mapTest: Velicer's MAP Test

View source: R/itemanalysis.R

mapTestR Documentation

Velicer's MAP Test

Description

Perform Velicer's Minimum Average Partial test for the variables (usually items) in a data frame.

Usage

mapTest(data, n = 20, ...)

## S3 method for class 'mapTest'
print(x, ...)

Arguments

data

a data frame containing the variables (items) to be analyzed

n

the maximum number of factors to consider (default: 20)

...

ignored

x

a mapTest object

Details

The plot method produces a graphical representation of the squared correlations.

Value

A vector of class 'mapTest' containing the average squared (partial) correlations. The first element of the vector is the average squared correlation with no component removed.

Author(s)

Computation: William Revelle, see psych, specifically VSS.

Plot: Michael Hock, michael.hock@uni-bamberg.de

References

Velicer, W. (1976) Determining the number of components from the matrix of partial correlations. Psychometrika, 41, 321-327.

Examples

local({
set.seed(1234)
#
# Simulate 2 factors (f1, f2) underlying 6 items (x1 to x6).
#
n <- 200
f1 <- rnorm(n)
f2 <- rnorm(n)
Df <- data.frame(x1 = f1 + rnorm(n),
                 x2 = f1 + rnorm(n),
                 x3 = f1 + rnorm(n),
                 x4 = f2 + rnorm(n),
                 x5 = f2 + rnorm(n),
                 x6 = f2 + rnorm(n))
mt <- mapTest(Df)
print(mt)
plot(mt)

#
# If we remove 1 item the MAP test suggests the wrong number of factors...
#
Df2 <- dplyr::select(Df, -6)
mt2 <- mapTest(Df2)
print(mt2)
plot(mt2)
factanal(Df2, 2)
})


mihock/iana documentation built on Jan. 14, 2024, 8:58 p.m.