Learn R Programming

GFM

=========================================================================

GFM: Generalized factor model for ultra-high dimensional variables with mixed types.

GFM is a package for analyzing the (ultra)high dimensional data with mixed-type variables, developed by the Huazhen Lin's lab. It is not only computationally efficient and scalable to the sample size increment, but also is capable of choosing the number of factors. In our JASA paper, a two-step method is proposed to estimate the factor and loading matrix, in which the first step used the alternate maximization (AM) algorithm to obtain initial estimator. In the paper, the information criterion was provided to determine the number of factors. Recently, we proposed an overdispersed generalized factor model (OverGFM) and designed a variational EM algorithm to implement OverGFM. A singular value ratio based method was provided to determine the number of factors. In addition, the estimate from OverGFM can be also used as the initial estimates in the first step for GFMs in our previous JASA paper.

Check out our JASA paper for alternate maximization and information criterion, SIM paper for the variational EM and singular value ratio based method, and our Package vignette for a more complete description of the usage of GFM and OverGFM.

GFM and OverGFM can be used to analyze experimental dataset from different areas, for instance:

  • Social and behavioral sciences
  • Economy and finance
  • Genomics...

Please see our new paper for model details:

Installation

To install the the packages 'GFM' from 'Github', firstly, install the 'remotes' package.

install.packages("remotes")
remotes::install_github("feiyoung/GFM")

Or install the the packages "GFM" from 'CRAN'

install.packages("GFM")

Usage

For usage examples and guided walkthroughs, check the vignettes directory of the repo.

Demonstration

For an example of typical GFM usage, please see our Package vignette for a demonstration and overview of the functions included in GFM.

NEWs

GFM version 1.2.2 (2026-01-17) Update the add_identifiability() function to achieve a faster implementation for large datasets.

GFM version 1.2.1 (2023-08-10)

The function overdispersedGFM() that implements the overdispersed generalized factor model is added. In addition, the function OverGFMchooseFacNumber() is added, which implements singular value ratio (SVR) based method to select the number of factors.

Copy Link

Version

Install

install.packages('GFM')

Monthly Downloads

204

Version

1.2.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Wei Liu

Last Published

January 18th, 2026

Functions in GFM (1.2.2)

Factorm

Factor Analysis Model
OverGFMchooseFacNumber

Choose the Number of factors for Overdispersed Generalized Factor Models
gendata

Generate simulated data
overdispersedGFM

Overdispersed Generalized Factor Model
measurefun

Assess the performance of an estimator on a matrix
gfm

Generalized Factor Model
chooseFacNumber

Choose the Number of factors for Generalized Factor Models