FactorAnalysis {RGenData} | R Documentation |
FactorAnalysis
Description
Analyzes comparison data with known factorial structures
Usage
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
# 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)
[Package RGenData version 1.0 Index]