Monday, January 30, 2012

Factor mixture analysis in Mplus

I'm using factor mixture analysis (FMA) for the estimation of latent classes (latent categories) and latent traits (latent dimensions) in the same model. I think it's great that this model provides an opportunity for combining factors and classes. Muthen even goes so far as to say that performing a Latent Class Analysis (LCA) or Factor Analysis (FA) is actually performing a restricted Factor Mixture Analysis (FMA), because in these models, the dimensional, or categorical, nature of the latent variables are not taken into account.

I was using the paper "MODELS AND STRATEGIES FOR FMA" on the statmodel website, to see how one would go about fitting such a model. It provides much more practical details about how to do a factor mixture analysis than most of the Muthen papers on FMA, which is great. At the same time, they leave some issues unresolved, and some issues just made me wonder. What follows are the questions / problems I came across, and my opinion on these issues.




Latent (co)variances

While their fmm-2 to fmm-5 models allow for the estimation of factor covariance matrices, only in fmm-3 to fmm-5, covariances between latent traits are modelled. I have been wondering for some time, why only class specific factor variances are modelled in fmm-2, while factor covariances are fixed to zero. The answer is simple and straightforward: by definition, latent classes do not permit covariances between the variables they explain, within classes. Covariances between the latent factors are supposed to be explained by the classes, so no covariations is allowed. However, variation on the latent traits within classes is allowed, by estimating variances for the factors, within class.


Prepare to wait and wait and wait


Estimating (c0)variances for the latent traits requires numerical integration.
This is invoked by adding the line "ALGORITHM = INTEGRATION" in the ANALYSIS command. Be prepared to wait a long time: it may take very long, depending on you sample size, number of observed variables, and number of latent variables. If you want a faster, but less precise solution, add the line "INTEGRATION = STANDARD(7)" (the default is 15). This should speed up things.

Obviously, more factors and more classes take more time. My model, consisting of two factors and 28 binary indicators, running on an HP probook 6550b in Mplus 6, took 24 hours to complete the estimation of a four class model (with the default precision, using 100 random starts and 10 final stage iterations). And then some authors advice to obtain likelihood ratio tests for the k vs. k-1 model comparison. I simply gave up, this would take me a week.


Comparing FMA results to FA or LCA results


I you want to compare the outputs of an exploratory (EFA) or confirmatory factor analysis (consisting of only latent traits, not latent classes) to an FMA model, you may want to obtain values for AIC, BIC and SSABIC to be able to compare an exclusively dimensional model to a factor mixture model. In order to obtain these, use ML estimation (or a robust variation of it: MLM, MLMV or MLR), by typing the line "ESTIMATOR = ML;" in the ANALYSIS command.

How many factors, and how many classes should we fit to the data? The authors don't seem to have an answer, either. In the introduction, they seem to argue that the number of factors and classes of the best fitting models, when only LCA of only FA is applied to the data should be taken as an upper limit for the number of factors and classes in an FMA. Later on however, they note "Because a large number of factors computationally intensive to fit with the already complicated FMM's, the fitting of models stopped with two factors." Yes, and then we didn't even try to obtain the Lo-Mendell-Rubin Likelihood ratio test (TECH 11), or the bootstrapped Likelihood ratio test (TECH 14). I'd suggest you just inspect AIC, BIC and SSABIC values, and especially: check if the model makes sense! A class solution which includes near zero proportions is not a useful solution, so try a solution with less classes.


Different loadings and tresholds (or intercepts) for each class?

Why would one want to estimate different loadings and treshold (or intercepts) in every class? It may result in better model fit, but how are we to interpret the resulting factorial structure? It seems in such a case, we are measuring a different latent variable in every class. Personally, I feel comparing models with non-invariant loadings and tresholds (or intercepts) across classes, turns the factor mixture model into an analysis of measurement invariance across latent classes, which seems to be an altogether different subject.

7 comments:

  1. Hi,
    I am trying to do mixture Rasch model, which is like combing one factor analysis and latent class. And my indicator is binary outcom(0/1). And I am using mplus user guide ex7.27 to practice, but in an example uses 2-parameter IRT model. However, now, I only just want to use one parameter model(which is Rasch model). And, my codes is
    %OVERALL%
    f BY u1-u8* (1)
    f@1;
    %c#1%
    f BY u1-u8 ;
    f;
    [u1$1-u8$1];
    %c#2%
    f BY u1-u8;
    f;
    [u1$1-u8$1];

    I am not sure if I am doing the mixture Rasch model, since I am not familiar with mplus.
    Thank you

    ReplyDelete
  2. I think you have to add "[f@0]; " to the %OVERALL% part. And I think you should leave the "f BY u1-u8 ;" and "f; " statements out of the class specific parts, because the loadings and factor variances should probably not be freely estimated across classes. The rest seems fine!

    ReplyDelete
  3. Thank you! I still have a few questions.
    Why should I have to make the mean equals to 0 in overall model?
    And, is it possible to get different variances across groups in mixture rasch model? that's why I set "f" in each class specific parts

    ReplyDelete
  4. By fixing the factor means at zero, the item difficulties / thresholds are identified. If you set factor loadings and factor variances to be equal across groups, item difficulties / thresholds are in the same metric across classes. You may want to vary factor variances across groups, but then the difficulties / thresholds are no longer in the same metric across classes. So this depends on the hypothesis you want to test. See also
    http://www.statmodel.com/discussion/messages/13/6490.html?1338642496
    and
    http://www.statmodel.com/discussion/messages/13/15451.html?1381963490

    ReplyDelete
  5. Thanks! I ran four models as following:
    1.Factor lodgings are freely estimated and equally, but the factor variance is freely estimated across classes and mean is set 0 across groups, then I got two sets of negative item discriminations in two classes..
    2.Factor lodgings are freely estimated and equally, but the factor variance is freely estimated across classes and mean doesn’t be fixed as 0,then I got two sets of positive item discriminations in two classes.
    3.Factor loadings are freely estimated and equally and the factor variance is fixed 1 across groups, but means are different across group, then I got an error message and the value of item discriminations are negative, but equally in two classes .
    4.Factor loadings are freely estimated and equally and the factor variance is fixed 1 across groups, but mean equals 0 across groups, then I got the same negative value of item discriminations across classes.

    The number 2 result should be better, because it doesn't give me the wrong message and give me the positive discrimination(I have checked my items if there is any negative wording items).
    I am wondering how should I choose the model. Also, another questions, does we can different values of item discrimination across classes, but the same value within a class in the mixed rasch model?

    ReplyDelete
    Replies
    1. Yes, you can have different values of item discrimination across classes. In this situation you call it mixture 1PL rather than mixture Rasch model. In order to get mixture Rasch model estimates (with the discrimination parameters equal to 1) you have to set loadings to 1 as shown below:

      f BY u1 - u8@1 ;

      As you already tried, there several situations that you can have. Keep that in mind we mostly assume that ability (factor) is distributed normal with mean of zero and variance of 1. It's good to set the factor variances to be equal 1 and means to zero. I usually use a syntax as below:

      %OVERALL%
      f BY u1 -u8;
      [ f@0 ];
      %c#1%
      f BY u1 - u8@1 ;
      f@1 ;
      [u1$1 - u8$1 ];
      %c#2%
      f BY u1 - u8@1 ;
      f@1 ;
      [u1$1 - u8$1 ];

      Sedat

      Delete
  6. I think it's best to check the links I've posted before, to the Mplus website. I don't have a lot of experience with Rasch Factor Mixture modeling, so anything I can tell you is on the Mplus forum, as well.

    ReplyDelete