ENH: factor analysis follow-up

Open
#4,164 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Begin by reading #3294 and its merged follow-up #4161, then inspect PR #4156's MLE factor-analysis work. Choose one of the listed enhancements and define its inputs, outputs, and tests before changing anything; the issue does not identify a file, test, or settled scope.

Written by the indexing model from the issue text.

Description

comp-multivariate type-enh

#3294 (merged in #4161) has several comments discussion design ideas. Most likely some refactoring will be necessary with the addition of new features.

PR #4156 has MLE for factor analysis

Stata has several additional results and post estimation results that we are still missing. Some results only apply if FA has been estimated by MLE

a few ENH possibilities

  • factor scoring: compute factor arrays, not unique and several methods are possible
  • more methods to choose the number of factors
  • implementation: use initially a large number of factors and compute some results for each number of factors, as far as those are independent of initial choice of factors. e.g. Stata allows to rotate fewer factors than computed in the raw loadings matrix.
  • hypothesis tests, fit statistics: likelihood based statistics require MLE.
  • display help for interpreting rotated loadings: cutoff to skip printing small loadings coefficients, sort
  • ...

unclear to me: cov versus corr

The basic results are scale invariant or equivariant, but some extra results might not be, and for other results we want to go back to the original scaling, i.e. we need standard deviation or cov.
example: I was getting confused about computing the underlying factors because using correlation or standardized exog changes the scale to normalized/beta coefficients.
(There is a considerable literature on using corr instead of cov in FA and covariance structure models. Not all methods are invariant or equivariant, but I didn't read any details.)

Dominant language
Python
Stars
11.6k
Forks
3.6k
Avg merge
7h 37m
Merged PRs (30d)
96

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from statsmodels/statsmodels

All issues in statsmodels/statsmodels

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.