Description Usage Arguments Value Examples
This function runs as Factor Analysis. The first step is to calculate the number of factors automatically. Once the number of factor is choosen, the Factor Analysis is run, and both the estimated factor variables and the loadings are calculated. Missing values aren't aloud. Details of the analysis for each step are:
# of Factors: Calculates the number of eigenvalues in the correlation matrix that
are larger then 1. The idea is that if the variance of a standardized variable is 1, then a factor
should only be maintained if it's variance is at least one. See more details in eigen
.
Factor Analysis: The default options are rotation='varimax'
and
scores='regression'
. See more details in factanal
.
1 2 3 4 5 6 7 8 9 |
df |
A dataframe containing the variables to be used in the analysis. |
n.fat |
A number with the number of factors to use. if NULL then the number of factors is calculated automatically. |
name |
A string with the name of the factor variables that will be created. |
sep |
A string with the character to be used separating name of the factor from the number of the factor |
rotation |
A string identifying the type of rotation to be performed. |
scores |
A string identifying the type of scores to be extracted. |
cut |
A number indicating the minimum size of factor loadings that should be kept. Loadings smaller then cut will be dropped. |
A list with two components:
factors(dataframe): with the variables with the scores extrated from the factor analysis.
loadings(dataframe): with the extracted factor loadings.
details(list): with all of the information returned from factanal.
1 | df_factan <- factor_analysis(df=df,cut=0.2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.