Skip to content

ENH: LCA Latent class modelling : finite mixtures for multivariate categorical data #3361

Open

Description

@josef-pkt

(I never heard about or looked at this)

stackoverflow question: http://stackoverflow.com/questions/41488795/what-is-the-proper-way-to-perform-latent-class-analysis-in-python

some information in this
http://stats.stackexchange.com/questions/122213/latent-class-analysis-vs-cluster-analysis-differences-in-inferences

a blog example R and SAS
http://sas-and-r.blogspot.ca/2011/01/example-821-latent-class-analysis.html

UCLA examples use mostly MPlus, e.g. examples for a text book
http://www.ats.ucla.edu/stat/examples/alca/

pennstate has a webpage and authors of a recent book, and code for Stata and SAS
https://methodology.psu.edu/latentclassbook
documentation for it https://methodology.psu.edu/sites/default/files/software/lcastata/Stata%20LCA%20Plugin-v1.2b.pdf
refers to Latent Gold which has (what looks like) a good technical documentation
http://www.statisticalinnovations.com/user-guides/
http://www.statisticalinnovations.com/wp-content/uploads/LGtecnical.pdf

aside: section 3.3 of Stata%20LCA%20Plugin-v1.2b.pdf
"The LCA Stata Plugin accommodates clusters and weights using the
pseudo-maximum-likelihood approach (Skinner, 1989; Vermunt & Magidson, 2005b, pp.
98-100). Under this approach, sampling weights are first standardized to have an average value
of 1 over all of the individuals being analyzed; they are then used as if they were frequency
weights in calculating the estimates. Clustering is ignored for estimation purposes, but is taken
into account in calculating standard errors by using a “robust” or “sandwich” style covariance
estimate.
"
related to survey sampling, analysis of complex survey data #3335


based on browsing for an hour:

this is mainly some version of multinomial logit with finite mixture random effects/parameters.
popular estimation methods seems to be a EM variant.
but other methods are possible http://www.john-uebersax.com/stat/faq.htm#est
using log-linear model mentioned there might be interesting

related: Sounds a bit like discrete choice model with random effects or random parameters with finite support mixing distribution.

The term "latent class models" for finite mixture random effect is also used in econometrics for standard univariate endog. This just a special case for random effects models, e.g. latent class poisson. It might be a bit more difficult if all parameters can change because the parameter space increases with k_params_random * k_support.

Besides the finite mixture probability estimation, the main issue will be which "base" model to use for the multivariate categorical or ordered endog.

Activity

  1. added this to the Someday milestone on Jan 6, 2017
  2. josef-pkt commented on Jan 6, 2017

    @josef-pkt
    MemberAuthor

    That's mainly to store the issue and some basic information (from 2 hour search). I have no intention of getting into this anytime soon.
    We might get some work done for this as a side effect in the context of mixture GLM/discrete models and methods for multivariate categorical variables.

  3. josef-pkt commented on Jan 6, 2017

    @josef-pkt
    MemberAuthor

    aside the wikipedia page mentions conditional independence https://en.wikipedia.org/wiki/Latent_class_model which sounds pretty strong/unrealistic.
    ???

  4. 00tau commented on Sep 25, 2018

    @00tau

    Just stumbled over latent class models (LCM), too. The model appears to
    be quite suitable to model intra- and inter-rater agreement since the
    interpretation of the fitted model parameters do not to suffer from all
    those weird paradoxes that you run into when trying to use (and
    interpret) Cohen's or Fleiss' κ-statistics.

    The text which suggested to takle my current analysis with an LCM was:

    Alan Agresti (2002) Categorical Data Analysis, 2nd Edition, Wiley
    

    The text contains a readable introduction to LCM and makes some remarks
    on how to best fit the model. It is suggested to start with an EM
    algorithm (less sensitiv to starting values), and then to switch to an
    Newton-Raphson algorithm (more speed).

    I hope I am able to put your mind at ease with the Conditional
    Independence assumption. It is not that of a very strong assumption and
    frequently met in many situations. Say, you have an instrument that
    measures some characteristic of an object and objects fall into two
    categories (say cases/controls or something). The instrument is well
    calibrated but there is still some measurement uncertainty left. Then
    given that I know the category into which an object falls, repeated
    measurements of the same object should be independent. That is
    conditional independence. Whenever you deal with any nested structure,
    a nested design, a nested model, you will find an inflationary use of
    the term :)

  5. josef-pkt commented on Sep 25, 2018

    @josef-pkt
    MemberAuthor

    @00tau Thanks for the explanation.

    My guess is, or it sounds like, that conditional independence is analogously used in the treatment effects and missing value literature, which I went through some time ago,
    (With my background in economics/econometrics I am always a bit skeptical about these kind of assumptions, but they seem to hold much more often outside of economics or social sciences.)

    If you have any code, then it would be interesting to add it to statsmodels, but it's not on my near future schedule to work on this myself.

    I read mixed comment about EM across topics, but many comments mention that it can also easily fail without good starting values and often doesn't do better than standard optimizers in terms of starting values or multiplicity of local optima. EM often converges at a slower rate than Newton-Raphson.
    (I never read anything specific to the LCM case.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions