Announcement

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

  • SEM far slower using SEM builder rather than command prompt

    I have inadvertently found out that the SEM modelling I am doing is far slower using the SEM builder rather than the command prompt. This can be replicated using:

    1) Open a stata datafile
    2) Open a stata SEM builder file
    3) Click ‘evaluate’ to run the SEM code. <-- time the time it takes to calculate

    4) Copy the code from the command prompt in step 3 to the clipboard
    5) Type clear all

    6) Reopen the stata datafile
    7) Paste the code to the stata dialog box <-- time the time it takes to calculate

    For me for a very simple code, the timings in step 3 was 25 seconds, and step 7 was 2.9 seconds. This 25 seconds is limited not by processing power (I get similar results using SE/MP2/MP4).

    This is with 300 variables, several latent variables, and mlmv for missing data. I have been steadily upgrading stata to MP to try and get a faster response, but it seems the limiting factor seems to be in the SEM builder (?bug) - I should be using the command prompt for fastest responses. I assume this is because each iteration etc. is being fed back to the SEM builder graphical interface, so slows things down. But there might be other reasons ?RAM due to graphical interface. I have gone back and tried Stata 16 MP2, and the same thing happens.

    Any thoughts? Anyone else noticed this?

  • #2
    What happens if you copy the code from the command prompt, exit and relaunch Stata, then repeat steps 6 and 7?
    -Chinh Nguyen

    Comment


    • #3
      Originally posted by Chinh Nguyen (StataCorp) View Post
      What happens if you copy the code from the command prompt, exit and relaunch Stata, then repeat steps 6 and 7?
      If I do this, it runs at the same fast speed (2 or 3 seconds).

      If I do not do steps 5 - 6 (ie close the file and then re-open it), running the code from the command prompt after opening a SEM builder window, it is slow (25s) even if I close the SEM builder window.
      Last edited by Jonathan Sturgeon; 20 May 2021, 12:54.

      Comment


      • #4
        Is it possible for you to send the data and do-file to tech support so that we can try to reproduce the problem? What kind of computer are you using so that we can try to reproduce your setup as well?
        -Chinh Nguyen

        Comment


        • #5
          Originally posted by Chinh Nguyen (StataCorp) View Post
          Is it possible for you to send the data and do-file to tech support so that we can try to reproduce the problem? What kind of computer are you using so that we can try to reproduce your setup as well?
          Yes, absolutely - Stata sales have put me on to tech support. I am still waiting to hear back.

          I use a macbook pro with Stata MP4. I have got this to be reproducible on another computer - a windows machine with Stata 17 SE.

          Comment


          • #6
            Please send your .stsem file as well.
            -Chinh Nguyen

            Comment

            Working...
            X