楼主: carweed
13375 13

[回归分析求助] probit模型后suest无法比较组间系数??? [推广有奖]

11
蓝色 发表于 2020-3-16 17:42:50
522746165 发表于 2020-3-16 14:40
您好,oprobit模型用这个命令testnl,也行耶
testnl

12
522746165 发表于 2020-3-16 18:35:02
就是您举的probit的例子,被解释变量是1到5的健康,最后一步跑不出结果。
oprobit health x1 x2 if x3==0
estimate store H1

oprobit health x1 x2 if x3==1

estimate store H2

suest H1 H2
testnl [H1_mean]hlwsy=[H2_mean]hlwsy
谢谢您的解答!!



13
peyzf 发表于 2021-5-22 15:57:34
学习一下

14
蓝色 发表于 2021-5-22 17:06:50
522746165 发表于 2020-3-16 18:35
就是您举的probit的例子,被解释变量是1到5的健康,最后一步跑不出结果。
oprobit health x1 x2 if x3==0
...
  1. webuse nhanes2f,clear

  2. ologit health female age age2 if black==0
  3. estimates store H1

  4. ologit health female age age2 if black==1
  5. estimates store H2

  6. suest H1 H2
  7. test [H1_health=H2_health]
  8. test [H1_health]age=[H2_health]age
  9. testnl ([/H1:cut2]/[/H2:cut1]=1)
复制代码
  1. . webuse nhanes2f,clear

  2. .
  3. . ologit health female age age2 if black==0

  4. Iteration 0:   log likelihood = -13997.837  
  5. Iteration 1:   log likelihood = -13317.402  
  6. Iteration 2:   log likelihood = -13311.275  
  7. Iteration 3:   log likelihood = -13311.267  
  8. Iteration 4:   log likelihood = -13311.267  

  9. Ordered logistic regression                     Number of obs     =      9,249
  10.                                                 LR chi2(3)        =    1373.14
  11.                                                 Prob > chi2       =     0.0000
  12. Log likelihood = -13311.267                     Pseudo R2         =     0.0490

  13. ------------------------------------------------------------------------------
  14.       health |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  15. -------------+----------------------------------------------------------------
  16.       female |  -.0952077   .0375905    -2.53   0.011    -.1688838   -.0215317
  17.          age |  -.0179163   .0080653    -2.22   0.026    -.0337241   -.0021085
  18.         age2 |   -.000252    .000086    -2.93   0.003    -.0004206   -.0000834
  19. -------------+----------------------------------------------------------------
  20.        /cut1 |  -4.457836   .1764808                     -4.803732    -4.11194
  21.        /cut2 |  -2.955428   .1733766                      -3.29524   -2.615616
  22.        /cut3 |  -1.539935   .1720174                     -1.877083   -1.202787
  23.        /cut4 |  -.2789443   .1707337                     -.6135762    .0556876
  24. ------------------------------------------------------------------------------

  25. . estimates store H1

  26. .
  27. . ologit health female age age2 if black==1

  28. Iteration 0:   log likelihood = -1680.0947  
  29. Iteration 1:   log likelihood = -1601.8591  
  30. Iteration 2:   log likelihood = -1601.0204  
  31. Iteration 3:   log likelihood = -1601.0192  
  32. Iteration 4:   log likelihood = -1601.0192  

  33. Ordered logistic regression                     Number of obs     =      1,086
  34.                                                 LR chi2(3)        =     158.15
  35.                                                 Prob > chi2       =     0.0000
  36. Log likelihood = -1601.0192                     Pseudo R2         =     0.0471

  37. ------------------------------------------------------------------------------
  38.       health |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  39. -------------+----------------------------------------------------------------
  40.       female |  -.2750393   .1103452    -2.49   0.013     -.491312   -.0587666
  41.          age |  -.0972085   .0234306    -4.15   0.000    -.1431316   -.0512854
  42.         age2 |   .0006294   .0002509     2.51   0.012     .0001376    .0011212
  43. -------------+----------------------------------------------------------------
  44.        /cut1 |  -5.138287   .5034841                     -6.125098   -4.151476
  45.        /cut2 |  -3.744747   .4966779                     -4.718218   -2.771276
  46.        /cut3 |  -2.219856   .4871053                     -3.174564   -1.265147
  47.        /cut4 |   -1.05487   .4840155                     -2.003523   -.1062167
  48. ------------------------------------------------------------------------------

  49. . estimates store H2

  50. .
  51. . suest H1 H2

  52. Simultaneous results for H1, H2

  53.                                                 Number of obs     =     10,335

  54. ------------------------------------------------------------------------------
  55.              |               Robust
  56.              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  57. -------------+----------------------------------------------------------------
  58. H1_health    |
  59.       female |  -.0952077   .0378189    -2.52   0.012    -.1693314   -.0210841
  60.          age |  -.0179163   .0080346    -2.23   0.026    -.0336638   -.0021688
  61.         age2 |   -.000252   .0000868    -2.90   0.004     -.000422   -.0000819
  62. -------------+----------------------------------------------------------------
  63. /H1          |
  64.         cut1 |  -4.457836   .1703434                     -4.791703   -4.123969
  65.         cut2 |  -2.955428    .168304                     -3.285297   -2.625558
  66.         cut3 |  -1.539935    .168019                     -1.869246   -1.210624
  67.         cut4 |  -.2789443   .1671412                     -.6065351    .0486465
  68. -------------+----------------------------------------------------------------
  69. H2_health    |
  70.       female |  -.2750393    .112539    -2.44   0.015    -.4956118   -.0544669
  71.          age |  -.0972085   .0241981    -4.02   0.000    -.1446359   -.0497811
  72.         age2 |   .0006294   .0002614     2.41   0.016     .0001171    .0011417
  73. -------------+----------------------------------------------------------------
  74. /H2          |
  75.         cut1 |  -5.138287   .5097376                     -6.137354    -4.13922
  76.         cut2 |  -3.744747   .5062732                     -4.737024    -2.75247
  77.         cut3 |  -2.219856   .5023155                     -3.204376   -1.235335
  78.         cut4 |   -1.05487   .4963075                     -2.027614   -.0821247
  79. ------------------------------------------------------------------------------

  80. . test [H1_health=H2_health]

  81. ( 1)  [H1_health]female - [H2_health]female = 0
  82. ( 2)  [H1_health]age - [H2_health]age = 0
  83. ( 3)  [H1_health]age2 - [H2_health]age2 = 0

  84.            chi2(  3) =   12.93
  85.          Prob > chi2 =    0.0048

  86. . test [H1_health]age=[H2_health]age

  87. ( 1)  [H1_health]age - [H2_health]age = 0

  88.            chi2(  1) =    9.67
  89.          Prob > chi2 =    0.0019

  90. . testnl ([/H1:cut2]/[/H2:cut1]=1)

  91.   (1)  [/H1:cut2]/[/H2:cut1] = 1

  92.                chi2(1) =       41.69
  93.            Prob > chi2 =        0.0000
复制代码

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-29 07:11