MGLM: An R Package for Multivariate Categorical Data Analysis

Data with multiple responses is ubiquitous in modern applications. However, few tools are available for regression analysis of multivariate counts. The most popular multinomial-logit model has a very restrictive mean-variance structure, limiting its applicability to many data sets. This article introduces an R package MGLM, short for multivariate response generalized linear models, that expands the current tools for regression analysis of polytomous data. Distribution fitting, random number generation, regression, and sparse regression are treated in a unifying framework. The algorithm, usage, and implementation details are discussed.

Juhyun Kim , Yiwen Zhang , Joshua Day , Hua Zhou

Supplementary materials

Supplementary materials are available in addition to this article. It can be downloaded at

CRAN packages used

MGLM, VGAM, glmnet, dirmult, parallel, isoform, glmc

CRAN Task Views implied by cited packages

Distributions, Survival, Econometrics, Environmetrics, ExtremeValue, MachineLearning, Multivariate, Psychometrics, SocialSciences


Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".


For attribution, please cite this work as

Kim, et al., "The R Journal: MGLM: An R Package for Multivariate Categorical Data Analysis", The R Journal, 2018

BibTeX citation

  author = {Kim, Juhyun and Zhang, Yiwen and Day, Joshua and Zhou, Hua},
  title = {The R Journal: MGLM: An R Package for Multivariate Categorical Data Analysis},
  journal = {The R Journal},
  year = {2018},
  note = {},
  doi = {10.32614/RJ-2018-015},
  volume = {10},
  issue = {1},
  issn = {2073-4859},
  pages = {73-90}