Announcement

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

  • weights when fmm: (pointmass) (streg)

    I'm trying to perform analysis on family building timing, for which I'm trying to estimate (particularly, the age distribution of first-time mothers, and I'm taking into account not every woman becomes a mother, which is why I'm using pointmass)

    Code:
    fmm if cohorte==2 [w=fac_mod], lcprob(i.estado i.indigena i.niv_esc): (pointmass embarazo) (streg i.estado i.indigena i.niv_esc, distribution(lognormal))
    but i always get

    Code:
    Fitting class model:
    
          __gsem_prod_arg1():  3200  conformability error
     _gsem_eval_cinfo__wrk():     -  function returned error
          _gsem_eval_cinfo():     -  function returned error
          mopt__calluser_v():     -  function returned error
           opt__eval_nr_v2():     -  function returned error
                 opt__eval():     -  function returned error
    opt__looputil_iter0_common():     -  function returned error
    opt__looputil_iter0_nr():     -  function returned error
              opt__loop_nr():     -  function returned error
                 opt__loop():     -  function returned error
                _moptimize():     -  function returned error
      _gsem_start__classid():     -  function returned error
       _gsem_start__factor():     -  function returned error
      _gsem_start__work_lc():     -  function returned error
         _gsem_start__work():     -  function returned error
               _gsem_start():     -  function returned error
               _gsem_build():     -  function returned error
               _gsem_parse():     -  function returned error
             st_gsem_parse():     -  function returned error
                     <istmt>:     -  function returned error
    r(3200);

    I have tried to define weights when stset, but doesn't work any way. Any idea on why this happens? I've already taken a look at the manuals, but I found no answer. When I take out the weights or use weights but without pointmass it works just fine, but to model the process properly I would like to use both weights and pointmas.
    Last edited by Mario Gallegos; 06 Jan 2026, 23:07.

  • #2
    You found a bug in fmm. We are able to reproduce the problem and will have it fixed in the next Stata 19 update. I can't say exactly when the next update is going to happen, but rest assured it is approaching fast.

    Comment


    • #3
      This is now fixed in Stata (and StataNow) update on 14jan2026. Note we are missing a help whatsnew item for this, but it is now fixed nevertheless.

      Comment

      Working...
      X