Announcement

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

  • Merlin syntax: Mopt_maxmin() error STATA17

    Dear Stata users,

    I'm trying to run the code following this article "merlin—A unified modeling framework for data analysis and methods development in Stata". However, in the final model, I have faced this issue, when I set the trace on, it seems that because the Mopt_maxmin() mata is blank. Could you help me to solve this problem? I'm really appreciated for your time. thank you very much.



  • #2
    The author Michael Crowther might or might not see this given a ping. If not, I would email him directly.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      The author Michael Crowther might or might not see this given a ping. If not, I would email him directly.
      Dear Nick Cox,

      Thank you very much for your kind support.

      Regards,

      Comment


      • #4
        Thanks for the post - this'll be fixed in the next update which should go up this week.

        Comment


        • #5
          Hi,

          I’m trying to fit transition-specific Cox models using the stmerlin command and returned the error below:

          merlin_setup_core(): 3259 nonstruct found where struct required
          merlin_setup(): - function returned error
          <istmt>: - function returned error


          I’ve tried to debug it but can’t see anything wrong with my command or variables.

          I started by setting the data for multistate modelling as follows:
          msset, id(pseudoID) states(bleeding_indic reinfarction_indic death_indic) times(time_bleeding time_reinfarction time_death) covariates(age sex ethnicity prevAMI hyperten hypercholes peripheral cerebrovasc renal smoking diabetic prevPCI prevCABG prevAngina famhist_chd p2y12 asp)

          Then set it for survival analysis:
          stset _stop, enter(_start) failure(_status=1) scale(365.25)

          Then fitted the Cox model as follows:
          ssc install merlin
          ssc install moremata
          ssc install gtools

          stmerlin age i.sex i.ethnicity i.prevAMI i.hyperten i.hypercholes i.peripheral i.cerebrovasc i.renal i.smoking i.diabetic i.prevPCI i.prevCABG i.prevAngina i.famhist_chd i.p2y12 i.asp if _trans1==1, distribution(cox)


          Seems the problem is with the structure of the variables, I tried running each variable at a time but none worked. Also I've imputed missing values in these variables, so I don't know where the problem is.

          Your help in debugging this will be highly appreciated, thanks!

          Comment


          • #6
            See #2 again. Best to contact Michael directly.

            Comment


            • #7
              test again after updating from github:
              Code:
              net install merlin, from("https://raw.githubusercontent.com/RedDoorAnalytics/merlin/main/") replace
              net install stmerlin, from("https://raw.githubusercontent.com/RedDoorAnalytics/stmerlin/main/") replace

              Comment

              Working...
              X