Announcement

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

  • SEM model estimation showing "last estimates not found"

    Hello,
    When I attempted to use the SEM model building and estimating tool the system showed the error message below:
    "estat gof, stats(all)
    last estimates not found
    r(301);"
    Not sure how to fix this problem. The data example is posted below and the attachment contains the research model. Your help is highly appreciated!

    Thanks!
    Wei

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int(CQ2 CQ3 CQ5 CQ7 CQ8 CQ9 CQ10 CQ11 CQ12 CQ15 CQ16 CQ17 CQ18 CQ19)
    -2 -2  1 -2 -1 -1 -1 -1 -1  1  1  1 -1 -1
     1  2  1  1 -1 -1  1 -1 -1  1 -1  1 -1 -1
     1 -1 -1  0 -1 -1 -1 -1  1 -1  1 -1  1 -1
     0 -2  1 -2 -1 -1  1  1 -1 -1 -1  1 -1  1
     0 -2 -1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1
     1 -2  1  0  1 -1 -1 -1  1 -1 -1  1  1 -1
    -1 -2  1 -1  1 -1  1 -1  1 -1 -1  1  1 -1
     1 -1  1  1  1  0  1  1  1 -1 -1 -1  1  1
    -2 -1  1  0 -1 -1 -1  1 -1 -1  1  1  1  1
     0  0  1  1  1 -1 -1 -1  1  1  1  1  1  1
     1  0  1  1  1 -1 -1 -1  1  1  1 -1  1 -1
     0 -1  1  0  1 -1 -1 -1 -1 -1 -1  1  1 -1
     0 -2 -1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1
     1  2 -1  2  1 -1 -1 -1  1 -1 -1 -1  1  1
     0 -2  1  0 -1 -1  1 -1 -1  1 -1  1 -1 -1
     0 -2  1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1
     1  1  1  1 -1 -1 -1 -1 -1  1  1 -1  1  1
     0 -2  1 -1 -1 -1  1  1 -1  1 -1  1 -1  1
     1 -2 -1  1  1 -1 -1 -1  1 -1  1 -1  1 -1
     0 -2  1  1  1 -1 -1 -1  1 -1 -1 -1  1  1
     0 -2  1  0  1  0 -1 -1  1 -1 -1  1  1  1
     1 -1  1  1  1 -1 -1 -1  1  1  1  1  1 -1
     2 -2  1  2  1 -1 -1 -1  1  1  1 -1  1 -1
     0 -2 -1  0 -1 -1 -1 -1  1 -1 -1  1 -1 -1
     0 -2  1 -1 -1 -1 -1 -1 -1  1 -1  1 -1 -1
     0 -1 -1  0  1 -1 -1 -1 -1  1  1  1  1 -1
     0  0 -1  0  1 -1 -1 -1  1 -1  1 -1  1 -1
     1 -1 -1  1  1  0 -1 -1  1 -1 -1  1  1 -1
     0 -1  1  0  1 -1  1 -1 -1 -1  1 -1  1 -1
     0 -2  1 -1 -1 -1  1  1 -1  1 -1  1 -1  1
     1 -2 -1  0  1 -1 -1 -1 -1 -1 -1 -1  1  1
     1 -2  1  2  1 -1 -1 -1  1  1  1 -1  1  1
     1 -2  1  1  1 -1 -1 -1  1  1  1  1  1  1
     0  2 -1  1  1 -1 -1 -1  1  1  1 -1  1 -1
     1 -2  1  1  1 -1  1  1  1 -1 -1 -1  1  1
     0  0  1  0  1  0 -1 -1  1 -1 -1  1  1  1
     0  1  1 -1  1  0 -1 -1  1  1  1  1  1  1
    -1 -1  1 -1  1  0  1  1  1 -1  1 -1  1 -1
     0 -1  1  1 -1  0 -1 -1 -1  1  1 -1  1  1
    -1  2  1 -1  1  1 -1  1  1  1 -1  1  1  1
    -1 -2  1 -2 -1 -1 -1 -1 -1 -1 -1  1 -1  1
     1 -2  1  1  1 -1  1 -1 -1 -1 -1 -1  1  1
     1 -1  1  1  1  0 -1  1  1  1  1 -1  1  1
     1  0  1 -2 -1 -1 -1 -1  1 -1  1 -1 -1 -1
     1 -2  1  0  1 -1 -1 -1  1 -1 -1  1  1 -1
     2 -1  1  0  1 -1 -1 -1  1  1  1 -1  1 -1
     0 -2  1  0  1 -1  1  1  1 -1 -1 -1  1  1
     1 -2  1  0  1  1 -1 -1  1 -1  1  1  1 -1
     1  0  1  2 -1 -1 -1 -1 -1 -1  1  1 -1 -1
     0 -1  1  0 -1  1 -1 -1 -1  1  1  1 -1  1
     1  1  1  1  1 -1 -1 -1  1  1  1 -1  1 -1
     0 -2  1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1
     0 -1 -1  0 -1 -1 -1 -1 -1  1  1 -1 -1 -1
     1  1  1  1  1 -1 -1 -1  1  1  1 -1  1 -1
     1 -2  1  1  1 -1 -1 -1  1 -1  1 -1  1 -1
     0 -1  1  0  1  0  1  1 -1  1 -1 -1  1 -1
     0 -2  1  0 -1 -1  1  1 -1 -1 -1 -1 -1 -1
     0  0  1  0 -1 -1 -1 -1  1  1  1  1 -1 -1
     0  0 -1  0  1 -1 -1 -1 -1 -1 -1 -1 -1 -1
     2 -2  1  2  1 -1 -1 -1  1 -1 -1  1  1  1
    -2  1  1 -1 -1 -1  1  1 -1  1 -1  1 -1  1
     0 -1  1  0  1 -1 -1 -1  1 -1 -1  1 -1  1
    -2  1 -1 -1 -1 -1  1  1 -1 -1 -1  1 -1 -1
     0 -2  1 -1  1 -1  1  1  1 -1 -1 -1  1 -1
     1 -2  1  0 -1 -1  1 -1 -1 -1 -1 -1  1 -1
    -1 -2 -1  0  1 -1 -1 -1  1 -1 -1  1  1  1
     0 -2  1 -1 -1 -1 -1 -1  1 -1 -1  1 -1  1
     0 -2  1  0 -1 -1 -1  1 -1 -1  1  1 -1 -1
     0 -1  1  0  1  0 -1 -1  1 -1 -1  1  1 -1
     0 -2  1  0  1 -1  1  1  1 -1 -1  1 -1 -1
    -1 -1  1  0 -1 -1  1  1 -1 -1 -1  1 -1 -1
     0 -2  1  0 -1 -1 -1 -1 -1 -1  1 -1 -1 -1
    -1  1  1 -2 -1 -1 -1 -1 -1  1 -1  1 -1 -1
    -2 -1  1 -2  1  1  1  1  1 -1 -1  1  1  1
    -1 -2  1  0 -1 -1  1 -1  1 -1 -1 -1  1  1
     0 -2 -1  0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
     1 -1  1  0  1 -1 -1 -1  1 -1 -1  1  1 -1
    -2 -2  1 -2 -1  1  1  1  1  1 -1  1 -1 -1
     1  1  1  1  1 -1 -1 -1  1 -1 -1  1  1  1
     0 -1  1  1 -1 -1 -1 -1  1  1  1 -1  1 -1
    -1  0  1 -1  1 -1 -1 -1  1 -1 -1  1  1 -1
     0 -2  1  0  1 -1 -1 -1 -1 -1 -1  1  1 -1
    -1 -1  1  0  1  1 -1 -1 -1 -1 -1 -1  1  1
     2  0  1  2  1 -1  1 -1  1  1  1  1  1  1
     0  0 -1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1
     0 -2 -1  2  1  0 -1 -1  1 -1 -1 -1  1 -1
     0 -2 -1  0 -1  0 -1  1 -1 -1 -1 -1 -1 -1
     0 -1  1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1
    -1 -2  1 -2 -1 -1  1  1 -1 -1 -1  1 -1  1
     0 -1  1  0  1  1  1 -1  1 -1 -1 -1  1  1
     2  2  1  2  1 -1 -1 -1  1  1  1 -1  1  1
    -1 -2  1  0  1 -1 -1 -1  1 -1 -1  1  1  1
     2 -2 -1 -2  1 -1 -1 -1  1 -1 -1  1  1  1
     1 -2 -1  0 -1 -1 -1 -1 -1  1 -1 -1 -1 -1
     1 -1  1  2  1 -1  1  1  1 -1 -1  1  1 -1
    -1 -2 -1  0  1 -1 -1 -1  1 -1 -1 -1  1  1
     0 -2  1  0 -1 -1  1  1 -1 -1  1  1 -1  1
     1  0  1  2 -1 -1 -1  1 -1 -1 -1 -1  1 -1
    -1 -1  1  1 -1 -1 -1  1 -1 -1 -1 -1  1 -1
     1 -1  1  2 -1 -1 -1 -1 -1 -1 -1 -1  1 -1
    end
    Attached Files

  • #2
    It seems that the postestimation command didn't find a fitted model. Did you get convergence with sem? It seems from the looks of your model and the nature of your data, that it might not have converged. That would explain the error message that you report.

    Comment


    • #3
      What was the actual sem command? I tried to estimate it using your .stsem file, but it says CQ20 isn't in the data set. It is in your diagram but not in your dataex file.

      Make sure what you upload provides a replicable example and we can better help you.
      -------------------------------------------
      Richard Williams, Notre Dame Dept of Sociology
      StataNow Version: 19.5 MP (2 processor)

      EMAIL: [email protected]
      WWW: https://academicweb.nd.edu/~rwilliam/

      Comment


      • #4
        Hi Richard,

        The SEM command was "estat gof, stats(all)", which I used to test the overall goodness of fit. I re-posted the data example containing variable CQ20 below. Any advice would be highly appreciated!
        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input int(CQ2 CQ3 CQ5 CQ7 CQ8 CQ9 CQ10 CQ11 CQ12 CQ15 CQ16 CQ17 CQ18 CQ19 CQ20)
        -2 -2  1 -2 -1 -1 -1 -1 -1  1  1  1 -1 -1 -1
         1  2  1  1 -1 -1  1 -1 -1  1 -1  1 -1 -1  1
         1 -1 -1  0 -1 -1 -1 -1  1 -1  1 -1  1 -1  1
         0 -2  1 -2 -1 -1  1  1 -1 -1 -1  1 -1  1 -1
         0 -2 -1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1  1
         1 -2  1  0  1 -1 -1 -1  1 -1 -1  1  1 -1  1
        -1 -2  1 -1  1 -1  1 -1  1 -1 -1  1  1 -1  1
         1 -1  1  1  1  0  1  1  1 -1 -1 -1  1  1  1
        -2 -1  1  0 -1 -1 -1  1 -1 -1  1  1  1  1  1
         0  0  1  1  1 -1 -1 -1  1  1  1  1  1  1  1
         1  0  1  1  1 -1 -1 -1  1  1  1 -1  1 -1  1
         0 -1  1  0  1 -1 -1 -1 -1 -1 -1  1  1 -1  1
         0 -2 -1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1  1
         1  2 -1  2  1 -1 -1 -1  1 -1 -1 -1  1  1 -1
         0 -2  1  0 -1 -1  1 -1 -1  1 -1  1 -1 -1 -1
         0 -2  1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1  1
         1  1  1  1 -1 -1 -1 -1 -1  1  1 -1  1  1  1
         0 -2  1 -1 -1 -1  1  1 -1  1 -1  1 -1  1 -1
         1 -2 -1  1  1 -1 -1 -1  1 -1  1 -1  1 -1  1
         0 -2  1  1  1 -1 -1 -1  1 -1 -1 -1  1  1 -1
         0 -2  1  0  1  0 -1 -1  1 -1 -1  1  1  1  1
         1 -1  1  1  1 -1 -1 -1  1  1  1  1  1 -1 -1
         2 -2  1  2  1 -1 -1 -1  1  1  1 -1  1 -1  1
         0 -2 -1  0 -1 -1 -1 -1  1 -1 -1  1 -1 -1 -1
         0 -2  1 -1 -1 -1 -1 -1 -1  1 -1  1 -1 -1  1
         0 -1 -1  0  1 -1 -1 -1 -1  1  1  1  1 -1  1
         0  0 -1  0  1 -1 -1 -1  1 -1  1 -1  1 -1  1
         1 -1 -1  1  1  0 -1 -1  1 -1 -1  1  1 -1 -1
         0 -1  1  0  1 -1  1 -1 -1 -1  1 -1  1 -1  1
         0 -2  1 -1 -1 -1  1  1 -1  1 -1  1 -1  1 -1
         1 -2 -1  0  1 -1 -1 -1 -1 -1 -1 -1  1  1  1
         1 -2  1  2  1 -1 -1 -1  1  1  1 -1  1  1  1
         1 -2  1  1  1 -1 -1 -1  1  1  1  1  1  1  1
         0  2 -1  1  1 -1 -1 -1  1  1  1 -1  1 -1  1
         1 -2  1  1  1 -1  1  1  1 -1 -1 -1  1  1  1
         0  0  1  0  1  0 -1 -1  1 -1 -1  1  1  1  1
         0  1  1 -1  1  0 -1 -1  1  1  1  1  1  1  1
        -1 -1  1 -1  1  0  1  1  1 -1  1 -1  1 -1  1
         0 -1  1  1 -1  0 -1 -1 -1  1  1 -1  1  1  1
        -1  2  1 -1  1  1 -1  1  1  1 -1  1  1  1  1
        -1 -2  1 -2 -1 -1 -1 -1 -1 -1 -1  1 -1  1  1
         1 -2  1  1  1 -1  1 -1 -1 -1 -1 -1  1  1 -1
         1 -1  1  1  1  0 -1  1  1  1  1 -1  1  1 -1
         1  0  1 -2 -1 -1 -1 -1  1 -1  1 -1 -1 -1 -1
         1 -2  1  0  1 -1 -1 -1  1 -1 -1  1  1 -1  1
         2 -1  1  0  1 -1 -1 -1  1  1  1 -1  1 -1  1
         0 -2  1  0  1 -1  1  1  1 -1 -1 -1  1  1  1
         1 -2  1  0  1  1 -1 -1  1 -1  1  1  1 -1  1
         1  0  1  2 -1 -1 -1 -1 -1 -1  1  1 -1 -1 -1
         0 -1  1  0 -1  1 -1 -1 -1  1  1  1 -1  1  1
         1  1  1  1  1 -1 -1 -1  1  1  1 -1  1 -1  1
         0 -2  1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1  1
         0 -1 -1  0 -1 -1 -1 -1 -1  1  1 -1 -1 -1 -1
         1  1  1  1  1 -1 -1 -1  1  1  1 -1  1 -1  1
         1 -2  1  1  1 -1 -1 -1  1 -1  1 -1  1 -1  1
         0 -1  1  0  1  0  1  1 -1  1 -1 -1  1 -1  1
         0 -2  1  0 -1 -1  1  1 -1 -1 -1 -1 -1 -1 -1
         0  0  1  0 -1 -1 -1 -1  1  1  1  1 -1 -1  1
         0  0 -1  0  1 -1 -1 -1 -1 -1 -1 -1 -1 -1  1
         2 -2  1  2  1 -1 -1 -1  1 -1 -1  1  1  1  1
        -2  1  1 -1 -1 -1  1  1 -1  1 -1  1 -1  1 -1
         0 -1  1  0  1 -1 -1 -1  1 -1 -1  1 -1  1 -1
        -2  1 -1 -1 -1 -1  1  1 -1 -1 -1  1 -1 -1 -1
         0 -2  1 -1  1 -1  1  1  1 -1 -1 -1  1 -1  1
         1 -2  1  0 -1 -1  1 -1 -1 -1 -1 -1  1 -1  1
        -1 -2 -1  0  1 -1 -1 -1  1 -1 -1  1  1  1  1
         0 -2  1 -1 -1 -1 -1 -1  1 -1 -1  1 -1  1 -1
         0 -2  1  0 -1 -1 -1  1 -1 -1  1  1 -1 -1 -1
         0 -1  1  0  1  0 -1 -1  1 -1 -1  1  1 -1  1
         0 -2  1  0  1 -1  1  1  1 -1 -1  1 -1 -1 -1
        -1 -1  1  0 -1 -1  1  1 -1 -1 -1  1 -1 -1 -1
         0 -2  1  0 -1 -1 -1 -1 -1 -1  1 -1 -1 -1 -1
        -1  1  1 -2 -1 -1 -1 -1 -1  1 -1  1 -1 -1 -1
        -2 -1  1 -2  1  1  1  1  1 -1 -1  1  1  1  1
        -1 -2  1  0 -1 -1  1 -1  1 -1 -1 -1  1  1  1
         0 -2 -1  0 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1  1
         1 -1  1  0  1 -1 -1 -1  1 -1 -1  1  1 -1  1
        -2 -2  1 -2 -1  1  1  1  1  1 -1  1 -1 -1 -1
         1  1  1  1  1 -1 -1 -1  1 -1 -1  1  1  1  1
         0 -1  1  1 -1 -1 -1 -1  1  1  1 -1  1 -1  1
        -1  0  1 -1  1 -1 -1 -1  1 -1 -1  1  1 -1  1
         0 -2  1  0  1 -1 -1 -1 -1 -1 -1  1  1 -1 -1
        -1 -1  1  0  1  1 -1 -1 -1 -1 -1 -1  1  1 -1
         2  0  1  2  1 -1  1 -1  1  1  1  1  1  1  1
         0  0 -1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1  1
         0 -2 -1  2  1  0 -1 -1  1 -1 -1 -1  1 -1  1
         0 -2 -1  0 -1  0 -1  1 -1 -1 -1 -1 -1 -1  1
         0 -1  1  0  1 -1 -1 -1  1 -1 -1 -1  1 -1  1
        -1 -2  1 -2 -1 -1  1  1 -1 -1 -1  1 -1  1 -1
         0 -1  1  0  1  1  1 -1  1 -1 -1 -1  1  1 -1
         2  2  1  2  1 -1 -1 -1  1  1  1 -1  1  1  1
        -1 -2  1  0  1 -1 -1 -1  1 -1 -1  1  1  1  1
         2 -2 -1 -2  1 -1 -1 -1  1 -1 -1  1  1  1  1
         1 -2 -1  0 -1 -1 -1 -1 -1  1 -1 -1 -1 -1  1
         1 -1  1  2  1 -1  1  1  1 -1 -1  1  1 -1  1
        -1 -2 -1  0  1 -1 -1 -1  1 -1 -1 -1  1  1  1
         0 -2  1  0 -1 -1  1  1 -1 -1  1  1 -1  1 -1
         1  0  1  2 -1 -1 -1  1 -1 -1 -1 -1  1 -1  1
        -1 -1  1  1 -1 -1 -1  1 -1 -1 -1 -1  1 -1 -1
         1 -1  1  2 -1 -1 -1 -1 -1 -1 -1 -1  1 -1  1
        end
        Attached Files

        Comment


        • #5
          Works for me. I created the data with your dataex file, opened your stsem file and told it to estimate the model, and got this:

          Code:
          . estat gof, stats(all)
          
          ----------------------------------------------------------------------------
          Fit statistic        |      Value   Description
          ---------------------+------------------------------------------------------
          Likelihood ratio     |
                   chi2_ms(85) |    193.880   model vs. saturated
                      p > chi2 |      0.000
                  chi2_bs(105) |    449.509   baseline vs. saturated
                      p > chi2 |      0.000
          ---------------------+------------------------------------------------------
          Population error     |
                         RMSEA |      0.113   Root mean squared error of approximation
           90% CI, lower bound |      0.092
                   upper bound |      0.134
                        pclose |      0.000   Probability RMSEA <= 0.05
          ---------------------+------------------------------------------------------
          Information criteria |
                           AIC |   3870.397   Akaike's information criterion
                           BIC |   4000.655   Bayesian information criterion
          ---------------------+------------------------------------------------------
          Baseline comparison  |
                           CFI |      0.684   Comparative fit index
                           TLI |      0.610   Tucker-Lewis index
          ---------------------+------------------------------------------------------
          Size of residuals    |
                          SRMR |      0.116   Standardized root mean squared residual
                            CD |      0.939   Coefficient of determination
          ----------------------------------------------------------------------------
          So, I really can't say what your problem is. Were you able to estimate the model in the first place? Remember, you don't just create the diagram, you have to tell Stata to estimate the model.

          I assume these 100 cases are just an extract, so maybe there are problems with the full data. See if you can get it to run with just the dataex cases, like I did. If you can't, maybe there is a problem with your Stata installation. Make sure it is up to date.

          Also, what version of Stata are you using?

          Also, here is the sem code that the diagram generates:

          Code:
          . sem (Attitude -> CQ2, ) (Attitude -> CQ5, ) (Attitude -> CQ17, ) (Attitude -> CQ8, ) (Attitude -> CQ12, ) (Attitude -> CQ18, ) (Attitude -> CQ20, ) (Norm -> C
          > Q11, ) (Norm -> CQ7, ) (Norm -> CQ9, ) (Norm -> CQ15, ) (Norm -> CQ20, ) (Control -> CQ3, ) (Control -> CQ10, ) (Control -> CQ16, ) (Control -> CQ19, ) (Contr
          > ol -> CQ20, ), covstruct(_lexogenous, diagonal) latent(Attitude Norm Control ) cov( Attitude*Norm Norm*Control Control*Attitude) nocapslatent
          -------------------------------------------
          Richard Williams, Notre Dame Dept of Sociology
          StataNow Version: 19.5 MP (2 processor)

          EMAIL: [email protected]
          WWW: https://academicweb.nd.edu/~rwilliam/

          Comment

          Working...
          X