Principal Component Analysis
Principal Component Analysis
Example usage
Arguments
data | the data as a data frame |
vars | a vector of strings naming the variables of interest in data |
nFactorMethod | 'parallel' (default), 'eigen' or 'fixed', the way to determine the number of factors |
nFactors | an integer (default: 1), the number of components in the model |
minEigen | a number (default: 1), the minimal eigenvalue for a component to be included in the model |
rotation | 'none', 'varimax' (default), 'quartimax', 'promax', 'oblimin', or 'simplimax', the rotation to use in estimation |
hideLoadings | a number (default: 0.3), hide loadings below this value |
sortLoadings | TRUE or FALSE (default), sort the factor loadings by size |
screePlot | TRUE or FALSE (default), show scree plot |
eigen | TRUE or FALSE (default), show eigenvalue table |
factorCor | TRUE or FALSE (default), show factor correlations |
factorSummary | TRUE or FALSE (default), show factor summary |
kmo | TRUE or FALSE (default), show Kaiser-Meyer-Olkin (KMO) measure of sampling adequacy (MSA) results |
bartlett | TRUE or FALSE (default), show Bartlett's test of sphericity results |
Returns
A results object containing:
results$loadings | a table |
results$factorStats$factorSummary | a table |
results$factorStats$factorCor | a table |
results$modelFit$fit | a table |
results$assump$bartlett | a table |
results$assump$kmo | a table |
results$eigen$initEigen | a table |
results$eigen$screePlot |
Tables can be converted to data frames with asDF or as.data.frame(). For example:
results$loadings$asDF
as.data.frame(results$loadings)