EFACompData {RGenData}R Documentation

EFACompData

Description

Comparison data

Usage

EFACompData(data, f.max, n.pop = 10000, n.samples = 500, alpha = .30, graph = FALSE,
corr.type = "pearson")

Arguments

data

Matrix to store the simulated data (matrix).

f.max

Largest number of factors to consider (scalar).

n.pop

Size of finite populations of comparison data (scalar, default is 10,000 cases).

n.samples

Number of samples drawn from each population (scalar, default is 500).

alpha

Alpha level when testing statistical significance of improvement with additional factor (scalar, default is .30)

graph

Whether to plot the fit of eigenvalues to those for comparison data (default is FALSE).

corr.type

Type of correlation (character, default is "pearson", user can also call "spearman").

Value

Nothing, displays number of factors on screen.

Author(s)

John Ruscio

References

Ruscio & Roche (2011)

Examples

# create data matrix x with n = 200 cases, k = 9 variables
# 3 variables load onto each of 3 orthogonal factors
# all marginal distributions are highly skewed
x <- matrix(nrow = 200, ncol = 9)
for (i in 1:3) {
  shared <- rchisq(200, 1)
  for (j in 1:3) {
    x[, (i - 1) * 3 + j] <- shared + rchisq(200, 1)
  }
}
# empirically determine number of factors in data matrix x
EFACompData(x, f.max = 5)

[Package RGenData version 1.0 Index]