Announcement

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

  • cmp error 3300 for fitting full model

    Dear Statalists,

    I am trying to run the cmp model command, but Stata continuously gives an error. I read that some problems could be related to the Stata version, however, I have a 14.2 Stata version which is relatively new. We tried also using Stata 15.1 and Stata 16 (for students) and it is still not working. However, a colleague of ours with Stata 16 was able to perfectly run the command.

    Looking on Statalist, the only post which was talking about this error was referring to a possible bug related to CMP command.

    This is the code that I am running, it gives regression estimates but is not completing the fitting full model:

    Code:
    cmp setup 
    
    eststo mix: cmp  ///
                (fi: new_meal_freq_sum = anom_tmax9_POS ihs_vio_pres i.quarter#i.year i.N_States_ID || grid_id: )  ///
                (con: ihs_vio_fut= new_meal_freq_sum anom_tmax9_POS ihs_vio_pres i.quarter#i.year i.N_States_ID || grid_id:)  ///
                , ind($cmp_cont $cmp_cont) difficult technique(dfp) ghkdraws(33, type(halton) anti) nolrtest
    The error that Stata gives is the follwoing:

    Code:
    Fitting full model.
    J(): 3300 argument out of range
    cmp_model::cmp_init(): - function returned error
    <istmt>: - function returned error
    Mata run-time error
    I have tried to look at it more specifically using "set trace on" and this is wait Stata gives:

    Code:
     - mata moptimize_init_userinfo($ML_M, 1, &_mod)
                = mata moptimize_init_userinfo(_MLM1, 1, &_mod)
                - mata _mod.cmp_init($ML_M)
                = mata _mod.cmp_init(_MLM1)
                         J():  3300  argument out of range
       cmp_model::cmp_init():     -  function returned error
                     <istmt>:     -  function returned error
                  capture noisily `mlmaxcmd' noclear `this_mlopts' `iterate'
                  if _rc==1400 {
    and again:

    Code:
       - exit
              ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- end ml ---
            -------------------------------------------------------------------------------------------------------------------------------------------------------------------- end cmp_clear ---
          - error `rc'
          = error 3300
    Mata run-time error
            }
          ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- end cmp ---
          }
    Does anyone know how to solve this problem ?

    Thank you very much in advance !

  • #2
    For the record, the underlying issue was that the group variable group_id had some missing values. Version 8.7.1 of cmp handles this situation better, by dropping those observations.

    Comment

    Working...
    X