LSTMfactors: Determining the Number of Factors in Exploratory Factor Analysis by LSTM

A method for factor retention using a pre-trained Long Short Term Memory (LSTM) Network, which is originally developed by Hochreiter and Schmidhuber (1997) <doi:10.1162/neco.1997.9.8.1735>, is provided. The sample size of the dataset used to train the LSTM model is 1,000,000. Each sample is a batch of simulated response data with a specific latent factor structure. The eigenvalues of these response data will be used as sequential data to train the LSTM. The pre-trained LSTM is capable of factor retention for real response data with a true latent factor number ranging from 1 to 10, that is, determining the number of factors.

Getting started

Package details

AuthorHaijiang Qin [aut, cre, cph] (ORCID: <https://orcid.org/0009-0000-6721-5653>), Lei Guo [aut, cph] (ORCID: <https://orcid.org/0000-0002-8273-3587>)
MaintainerHaijiang Qin <haijiang133@outlook.com>
LicenseGPL-3
Version1.0.0
URL https://haijiangqin.com/LSTMfactors/
Package repositoryView on CRAN
Installation Install the latest version of this package by entering the following in R:
install.packages("LSTMfactors")

Try the LSTMfactors package in your browser

Any scripts or data that you put into this service are public.

LSTMfactors documentation built on Aug. 8, 2025, 7:33 p.m.