Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing measurement invariance across two groups/endless iterations when fitting the model

    I am trying to test measurement invariance for a scale with 20 items loading 4 latent variables (no cross-loadings) and 4 error correlations. However, while fitting a target model there are endless iterations and no results. Any advice on why this is happening and how to solve it? Thanks in advance!
    Here is the command I used:
    sem (Meta_CQ -> cqs1 cqs2 cqs3 cqs4) (Cog_CQ -> cqs5 cqs6 cqs7 cqs8 cqs9 cqs10) (Mot_CQ -> cqs11 cqs12 cqs13 cqs14 cqs15) (Bih_CQ -> cqs16 cqs17 cqs18 cqs19 cqs20), covstruct(_lexogenous, diagonal) latent(Meta_CQ Cog_CQ Mot_CQ Bih_CQ ) cov( e.cqs1*e.cqs3 Cog_CQ*Meta_CQ Mot_CQ*Meta_CQ Mot_CQ*Cog_CQ e.cqs11*e.cqs12 Bih_CQ*Meta_CQ Bih_CQ*Cog_CQ Bih_CQ*Mot_CQ e.cqs19*e.cqs20) nocapslatent ginvariant(mcoef) group(grupa)

  • #2
    Originally posted by Tijana Jokic View Post
    I am trying to test measurement invariance . . . However, while fitting a target model there are endless iterations and no results. Any advice on why this is happening and how to solve it?
    It's because your model is not identified. You can see that in the error message when you run the following code.
    Code:
    version 17.0
    
    clear *
    
    // seedem
    set seed 570524910
    
    program define drawEm
        version 17.0
        syntax newvarlist, [n(integer 0)]
    
        local var_count : word count `varlist'
    
        if `n' local N n(`n')
        else local N
    
        tempname Corr
        matrix define `Corr' = J(`var_count', `var_count', 0.5) + I(`var_count') * 0.5
    
        quietly drawnorm `varlist', double corr(`Corr') `N'
    end
    
    local first 1
    foreach pair in "1 4" "5 10" "11 15" "16 20" {
    
        local varlist
    
        local numlist : subinstr local pair " " "(1)"
    
        forvalues i = `numlist' {
            local varlist `varlist' cqs`i'
        }
        if `first' {
            drawEm `varlist', n(500)
            local ++first
        }
        else drawEm `varlist'
    }
    
    generate byte grupa = mod(_n, 2)
    
    sem ///
        (Meta_CQ -> cqs1 cqs2 cqs3 cqs4) ///
        (Cog_CQ -> cqs5 cqs6 cqs7 cqs8 cqs9 cqs10) ///
        (Mot_CQ -> cqs11 cqs12 cqs13 cqs14 cqs15) ///
        (Bih_CQ -> cqs16 cqs17 cqs18 cqs19 cqs20), ///
            covstruct(_lexogenous, diagonal) ///
            latent(Meta_CQ Cog_CQ Mot_CQ Bih_CQ ) ///
            cov( ///
                e.cqs1*e.cqs3 ///
                Cog_CQ*Meta_CQ ///
                Mot_CQ*Meta_CQ ///
                Mot_CQ*Cog_CQ ///
                e.cqs11*e.cqs12 ///
                Bih_CQ*Meta_CQ ///
                Bih_CQ*Cog_CQ ///
                Bih_CQ*Mot_CQ ///
                e.cqs19*e.cqs20) ///
            nocapslatent ///
            ginvariant(mcoef) group(grupa) ///
            iterate(5)
    
    exit
    Warning: The LR test of model vs. saturated is not reported because the
    fitted model is not full rank. There appears to be 4 more fitted
    parameters than the data can support.


    You need to add four model-identifying constraints: one each to the intercept of the first indicator variable of your four latent factors. To see how to do that, look at the worked example at UCLA's website here.

    Comment


    • #3
      Thank you for taking time and suggesting a solution. Unfortunately, the same keeps happening and I cannot figure out what I am doing wrong.
      Here is the command after introducing constraints:
      sem (Meta_CQ -> cqs1 cqs2 cqs3 cqs4) (cqs1 <- _cons@0) (Cog_CQ -> cqs5 cqs6 cqs7 cqs8 cqs9 cqs10) (cqs5 <- _cons@0) (Mot_CQ -> cqs11 cqs12 cqs13 cqs14 cqs15) (cqs11 <- _cons@0) (Bih_CQ -> cqs16 cqs17 cqs18 cqs19 cqs20) (cqs16 <- _cons@0), covstruct(_lexogenous, diagonal) latent(Meta_CQ Cog_CQ Mot_CQ Bih_CQ ) cov( e.cqs1*e.cqs3 Cog_CQ*Meta_CQ Mot_CQ*Meta_CQ Mot_CQ*Cog_CQ e.cqs11*e.cqs12 Bih_CQ*Meta_CQ Bih_CQ*Cog_CQ Bih_CQ*Mot_CQ e.cqs19*e.cqs20) means( Meta_CQ Cog_CQ Mot_CQ Bih_CQ) nocapslatent ginvariant(none) group(grupa)

      Comment


      • #4
        Originally posted by Tijana Jokic View Post
        . . . the same keeps happening and I cannot figure out what I am doing wrong.
        I assume that you don't have trouble when you fit an ungrouped model (no grouping factor, just an omnibus model).

        Is that correct?

        If so, then try using those as starting values for the corresponding coefficients in the grouped model.

        Also consider simplifying your model. You can start with the frilly covariances among the indicator variables' residuals--they look as if you've taken modification indices too seriously. Or add additional constraints as needed.

        Comment


        • #5
          Oh, and another tactic.

          For some reason Stata's -sem- doesn't like covariances between latent factors of a low-order confirmatory factor analysis so much as it does factor loadings of the exactly equivalent higher-order CFA model.

          So try re-writing all of those covariances between the four latent factors of your first-order CFA as factor loadings on a single second-order latent factor.

          Comment


          • #6
            Dear Joseph, I am sorry I didn't write to you earlier. I haven't had the opportunity to try out your suggestions (which all seem very useful) yet. I will get back to you on Thursday the latest Thank you so much for your support!

            Comment

            Working...
            X