【问题标题】:Correcting constraint mlogit stata [closed]更正约束 mlogit stata [关闭]
【发布时间】:2018-07-06 12:57:59
【问题描述】:

所以我有点麻烦。我需要对状态中的数据进行约束以运行 mlogit,但它一直表示尚未找到方程。有人可以帮忙吗?

【问题讨论】:

标签: stata mlogit


【解决方案1】:

由于您没有提供完整的输出或 MCVE,因此很难确定到底出了什么问题。错误 303 表示:

您引用了一个系数或存储的结果对应于一个 无法找到的方程式或结果。

这意味着您可能通过引用数值而不是 Stata 用于标记每个方程的相应值标签来错误地定义约束。

代替

constraint 1 [insure=3]:age =-1*[insure=2]:age

试试这样的:

. webuse sysdsn1
(Health insurance data)

. label list insure 
insure:
           1 Indemnity
           2 Prepaid
           3 Uninsure

. constraint 1 [Uninsure]:age =-1*[Prepaid]:age

. mlogit insure age male i.site, constraints(1) nolog

Multinomial logistic regression                 Number of obs     =        615
                                                Wald chi2(7)      =      20.43
Log likelihood = -544.32915                     Prob > chi2       =     0.0047

 ( 1)  [Prepaid]age + [Uninsure]age = 0
------------------------------------------------------------------------------
      insure |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
Indemnity    |  (base outcome)
-------------+----------------------------------------------------------------
Prepaid      |
         age |  -.0054932   .0046759    -1.17   0.240    -.0146579    .0036714
        male |   .4673414   .1980637     2.36   0.018     .0791436    .8555392
             |
        site |
          2  |  -.0030463   .2045162    -0.01   0.988    -.4038907     .397798
          3  |  -.4001761   .2179144    -1.84   0.066    -.8272804    .0269282
             |
       _cons |   .1940359   .2672973     0.73   0.468    -.3298572     .717929
-------------+----------------------------------------------------------------
Uninsure     |
         age |   .0054932   .0046759     1.17   0.240    -.0036714    .0146579
        male |   .4015065   .3642457     1.10   0.270    -.3124019    1.115415
             |
        site |
          2  |  -1.192478   .4670081    -2.55   0.011    -2.107797   -.2771591
          3  |  -.1393011   .3592712    -0.39   0.698    -.8434596    .5648575
             |
       _cons |  -1.868834   .3596923    -5.20   0.000    -2.573818    -1.16385
------------------------------------------------------------------------------

【讨论】:

  • 不错的收获。虽然我怀疑我们永远不会知道这是否真的是问题所在。
  • @PearlySpencer 使用第一个版本的约束将产生相同的 303 错误,但我同意这不是确定的。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-05
  • 2010-09-24
  • 2010-10-18
  • 1970-01-01
相关资源
最近更新 更多