FactorAnalysis: FactorAnalysis

Description Usage Arguments Value Author(s) References Examples

View source: R/EFAGenData.R

Description

Analyzes comparison data with known factorial structures

Usage

1
2
FactorAnalysis(data, corr.matrix = FALSE, max.iteration = 50,n.factors = 0,
corr.type = "pearson")

Arguments

data

Matrix to store the simulated data (matrix).

corr.matrix

Correlation matrix (default is FALSE)

max.iteration

Maximum number of iterations (scalar, default is 50).

n.factors

Number of factors (scalar, default is 0).

corr.type

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

Value

$loadings

Factor loadings (vector, if one factor. matrix, if multiple factors)

$factors

Number of factors (scalar).

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)
  }
}
# perform factor analysis of data matrix x
FactorAnalysis(x)

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