I have a dataset with 29 items to be run Exploratory Factor Analysis. I have implemented this dataset with the same factors in both Python and Stata, but I have two different results. Actually they are different since I identified the eigenvalues: in Python it is 4 but in Stata only 2.
Why are there such differences and which result should I take? Here are my codes Python
df = df[df.g1 == 3]
fa = FactorAnalyzer()
fa.set_params(n_factors=6) # so factor
fa.fit(df)
fa.loadings_
fa_loading_df = pd.DataFrame(fa.loadings_, columns=['Factor 1', 'Factor 2', 'Factor 3', 'Factor 4', 'Factor 5', 'Factor 6'])
Stata
factor k2x1-k2x29 if g1==3, factor(6)
rotate, varimax norm blanks(.40)