EFACompData: EFACompData

Description Usage Arguments Value Author(s) References Examples

View source: R/EFAGenData.R

Description

Comparison data

Usage

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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)

RGenData documentation built on May 2, 2019, 2:47 p.m.