Announcement

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

  • Second order SEM analysis

    Hi everyone, I hope that you can help me with my data.
    I have a SEM model like picture 1. I have set the constrain value to 1 for 1st order, however, when I estimated the coefficient, I received a notification (not concave) and picture 2.
    Would you might help me explain why and how could I process it?
    I would really appreciate it if you could help me, I am a new STATA user.
    Sincere thanks
    Diep Nguyen
    Click image for larger version

Name:	image_32307.jpg
Views:	2
Size:	257.1 KB
ID:	1727457

    Click image for larger version

Name:	image_32308.jpg
Views:	2
Size:	19.4 KB
ID:	1727458

  • #2
    The problem may be due to the two item factors in your model (SE3 and GC1). Two-item factors are not identified unless you impose constraints on the factor loadings. I would suggest setting the loadings of b1x1 and b1x2 on GC1 to be equal to each other and then also set the loadings for c3x1 and c3x2 on SE3 to be the equal to each other. For example:
    Code:
    (GC1 -> b1x1@g1 b1x2@g1)
    You may also want to simplify the model a bit to see if the simpler model converges. For example, remove the higher order factors (GC and SE). Does the model converge?
    Last edited by Erik Ruzek; 18 Sep 2023, 15:20. Reason: Fixed coding error

    Comment


    • #3
      Thank you Erik

      Code:
      (GC1 -> b1x1@g1 b1x2@g1)
      - kindly help me understand what g1 stands for. I use SEM builder to draw hence I don't know where to put this code. I'm a new STATA user. Does it mean I should set both constrains of 2-item factors to 1 in the SEM builder?

      You may also want to simplify the model a bit to see if the simpler model converges. For example, remove the higher order factors (GC and SE). Does the model converge? - I have tried this before, but I received "Estimation failed" as following picture

      Click image for larger version

Name:	Screenshot 2023-09-19 113145.jpg
Views:	1
Size:	38.9 KB
ID:	1727533


      Many thanks for your support
      Diep

      Comment


      • #4
        Hi Erik,

        I've tried this code as your guide:

        sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE1 -> CL, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE2 -> CL, ) (SE3 -> c3x1@g1, ) (SE3 -> c3x2@g1, ) (SE3 -> CL, ) (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC1 -> CL, ) (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC2 -> CL, ) (GC3 -> b2x3, ) (GC3 -> b2x4, ) (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) (GC3 -> b3x4, ) (GC3 -> b3x5, ) (GC3 -> CL, ) (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ), covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 GC1 GC2 GC3 CL) nocapslatent

        And I get the result from SE1 SE2 SE3 GC1 GC2 GC3 directly to CL

        However, when I run this code to access the impact of second-order SE, GC to CL

        sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE3 -> c3x1@g1, ) (SE3 -> c3x2@g1, ) (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC3 -> b2x3, ) (GC3 -> b2x4, ) (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) (GC3 -> b3x4, ) (GC3 -> b3x5, ) (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ) (SE -> SE1, ) (SE -> SE2, ) (SE -> SE3, ) (GC -> GC1, ) (GC -> GC2, ) (GC -> GC3, ) (SE -> CL, ) (GC -> CL, ), covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 SE GC1 GC2 GC3 GC CL) nocapslatent

        Then I received the following notification.
        Click image for larger version

Name:	Screenshot 2023-09-19 172727.jpg
Views:	1
Size:	21.5 KB
ID:	1727551


        Thank you for reading the post,

        Diep

        Comment


        • #5
          You want to set the SE3 factor loadings to be equal to each other, but not equal to the GC1 factor loadings. Note that I've put a different set of constraints on the loadings for those two factors. The g1 and s1 are how you tell sem that you want to constrain a parameter. When you label different parameters with the same constraint, then sem sets those parameters to be equivalent.
          Code:
          sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE1 -> CL, ) ///
          (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE2 -> CL, ) ///
          (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) (SE3 -> CL, ) ///
          (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC1 -> CL, ) ///
          (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC2 -> CL, ) ///
          (GC3 -> b2x3, ) (GC3 -> b2x4, ) (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) ///
          (GC3 -> b3x4, ) (GC3 -> b3x5, ) (GC3 -> CL, ) ///
          (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ), ///
          covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 GC1 GC2 GC3 CL)
          Your model is incredibly complex. I would estimate each of the higher order factors separately. Do they converge when they are the only thing in the model? If so, try a model where you have just a couple of them in there. And so on. Build slowly so you can figure out where you may be encountering problems.
          Last edited by Erik Ruzek; 19 Sep 2023, 07:39. Reason: edited code for readability

          Comment


          • #6
            Hi Erik,

            Thank you very much for your support. However, when I tried your code

            Code:
            sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE1 -> CL, ) /// (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE2 -> CL, ) /// (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) (SE3 -> CL, ) /// (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC1 -> CL, ) /// (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC2 -> CL, ) /// (GC3 -> b2x3, ) (GC3 -> b2x4, ) (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) /// (GC3 -> b3x4, ) (GC3 -> b3x5, ) (GC3 -> CL, ) /// (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ), /// covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 GC1 GC2 GC3 CL)
            I received the following notification


            In this model, we would like to test hypotheses of a newly developed scale GC and other factors, so it is a bit complex.
            Thank you, once again,

            Diep

            Comment


            • #7
              Hi Erik,

              Thank you very much for your support. However, when I tried your code

              Code:
              sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE1 -> CL, ) /// (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE2 -> CL, ) /// (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) (SE3 -> CL, ) /// (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC1 -> CL, ) /// (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC2 -> CL, ) /// (GC3 -> b2x3, ) (GC3 -> b2x4, ) (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) /// (GC3 -> b3x4, ) (GC3 -> b3x5, ) (GC3 -> CL, ) /// (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ), /// covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 GC1 GC2 GC3 CL)
              I received the following notification


              In this model, we would like to test hypotheses of a newly developed scale GC and other factors, so it is a bit complex.
              Thank you, once again,

              Diep

              Comment


              • #8
                Hello Diep,

                There appears to be a problem with your code that probably stems from where it was copied from. I see the following -> instead of ->.

                The notification you received did not come through. Can you copy it from the Stata Results window and post it here. Please use the code delimiters when doing so.

                Comment


                • #9
                  Hi Erik,

                  I have copied exactly the code that you suggested to run my model. I'm sorry that I pasted it in the previous post, it have some problems.

                  Code
                  Code:
                   
                   sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE1 -> CL, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE2 -> CL, ) (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) (SE3 -> CL, ) /// (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC1 -> CL, ) (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC2 -> CL, ) /// (GC3 -> b2x3, ) (GC3 -> b2x4, ) (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) (GC3 -> b3x4, ) (GC3 -> b3x5, ) (GC3 -> CL, ) /// (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ), covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 GC1 GC2 GC3 CL)
                  Thank you,

                  Diep

                  Comment


                  • #10
                    The code you pasted is inconsistent with the image you showed in the initial post. Let's just focus on the subset of code related to the SE1-3 latent variables.
                    Code:
                     sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE1 -> CL, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE2 -> CL, ) (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) (SE3 -> CL, )
                    Consistent with your image from post #1 of this thread, you have separate measurement models for SE1, SE2, and SE3.

                    Inconsistent with the image in post #1, you have SE1, SE2, and SE3 predicting CL These are not represented in your diagram.

                    Also inconsistent with the image in post #1 you do not have SE1, SE2, and SE3 being predicted by a higher order factor, SE. Accordingly I would expect to find the the following code in your sem statement, but it is not there:
                    Code:
                    (SE -> SE1 SE2 SE3)
                    Do you want the three SE factors to predict CL or do you want to have the three SE factors predicted by a higher-order SE factor?

                    Comment


                    • #11
                      Hi Erik,

                      I would like SE as a higher-order factor of SE1, SE2, and SE3. Similarly, GC is the higher-order of GC1, GC2, and GC3.

                      After that, there will be direct impacts from SE and GC to CL.

                      Thank you for your patience.

                      Comment


                      • #12
                        Erik,

                        In my #4 post, I've indicated I've tried the code

                        Code:
                        sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE3 -> c3x1@g1, ) (SE3 -> c3x2@g1, ) ///
                        (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC3 -> b2x3, ) (GC3 -> b2x4, ) ///
                        (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) (GC3 -> b3x4, ) (GC3 -> b3x5, ) (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ) ///
                        (SE -> SE1, ) (SE -> SE2, ) (SE -> SE3, ) (GC -> GC1, ) (GC -> GC2, ) (GC -> GC3, ) (SE -> CL, ) (GC -> CL, ), covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 SE GC1 GC2 GC3 GC CL) nocapslatent
                        But I couldn't perform the estimation. Even when I've tried the code, the same issue happened.

                        Code:
                        sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) ///
                        (GC1 -> b1x1@g1, ) (GC1 -> b1x2@g1, ) (GC2 -> b1x3, ) (GC2 -> b1x4, ) (GC2 -> b1x5, ) (GC2 -> b2x1, ) (GC2 -> b2x2, ) (GC3 -> b2x3, ) (GC3 -> b2x4, ) ///
                        (GC3 -> b3x1, ) (GC3 -> b3x2, ) (GC3 -> b3x3, ) (GC3 -> b3x4, ) (GC3 -> b3x5, ) (CL -> e1x1, ) (CL -> e1x2, ) (CL -> e1x3, ) ///
                        (SE -> SE1, ) (SE -> SE2, ) (SE -> SE3, ) (GC -> GC1, ) (GC -> GC2, ) (GC -> GC3, ) (SE -> CL, ) (GC -> CL, ), covstruct(_lexogenous, diagonal) standardized latent (SE1 SE2 SE3 SE GC1 GC2 GC3 GC CL) nocapslatent
                        Regards,

                        Diep

                        Comment


                        • #13
                          Without access to your data, it is hard to tell you why you are having convergence problems. If this were my data, I would build the model up one construct at a time. For example, does a model in which you are only estimating the SE1-S3 factors converge?
                          Code:
                          sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) ///
                              (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, )
                          Now add to the higher-order SE factor. Does it converge?
                          Code:
                          sem (SE1 -> c1x1, ) (SE1 -> c1x2, ) (SE1 -> c1x3, ) (SE2 -> c2x1, ) (SE2 -> c2x2, ) (SE2 -> c2x3, ) ///
                              (SE3 -> c3x1@s1, ) (SE3 -> c3x2@s1, ) ///
                              (SE -> SE1 SE2 SE3)
                          Do this for each of your constructs separately. Then combine two of them. Does the model converge? Now add the third. Does it converge?

                          Comment


                          • #14
                            Erik,

                            Here is my data file. Could you check the SEM model with your code? I've tried but it failed....

                            Thank you for your patience (I'm sorry I was absent the previous days because of a health problem)

                            Regards,
                            Attached Files

                            Comment


                            • #15
                              Unfortunately, I cannot do this justice as I do not have the time. A few observations:
                              • Your items are Likert scaled and the response distributions for the items suggest that respondents are utilizing a couple of categories more than others. You can see this in the relatively high skewness values for the items. Accordingly, you should likely be using methods more appropriate for such data, which would treat the items as ordered categorical. In Stata, that would be gsem.
                              • That said, your data has some limitations that might make categorical factor analysis somewhat challenging. First, you have a decent sample size, but when you have highly skewed data and two-item factors, you likely need more like 1,000+ individuals responding to the items to get accurate parameter estimates.
                              • Simplify and scale down the model. You do not have the sample size or the ideal response distributions for a model this complex. What are the essential elements that you want to keep? Build your model around those.
                              • It would be worth it to consult with a psychometrician or SEM expert. People like that are on this board, but have limited time to go as deep with your data as would be necessary.
                              I'd say that my big advice is to step back, think about what are the most critical elements of the phenomenon you are studying, focus on the constituent elements and figure out if you are measuring those well, and consult with a SEM/psychometrics expert. Sorry, I cannot give you more.

                              Comment

                              Working...
                              X