楼主: 15271844450
14481 11

[回归分析求助] 两个不同模型的系数差异化检验 [推广有奖]

  • 0关注
  • 1粉丝

大专生

85%

还不是VIP/贵宾

-

威望
0
论坛币
10 个
通用积分
0.0001
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
1047 点
帖子
41
精华
0
在线时间
29 小时
注册时间
2016-5-10
最后登录
2019-5-27

楼主
15271844450 发表于 2016-8-28 22:29:43 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
我在检验两个模型的系数的差异时,出现了这样的问题,不知道问什么 求解呀?
. suest m1 m2
unable to generate scores for model m1
suest requires that predict allow the score option
r(322);
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:差异化 generate requires require predict generate scores 模型

沙发
夏目贵志 发表于 2016-8-28 23:19:47
你估计这两个模型用的什么命令?

藤椅
15271844450 发表于 2016-8-29 09:15:56
夏目贵志 发表于 2016-8-28 23:19
你估计这两个模型用的什么命令?
我用了probit回归 xtprobit y x

板凳
黃河泉 在职认证  发表于 2016-8-29 15:21:47
网路上有人建议下列作法(我还需要进一步了解),让你做个参考:
  1. . sysuse auto, clear
  2. (1978 Automobile Data)

  3. .
  4. . probit foreign mpg rep78,

  5. Iteration 0:   log likelihood = -42.400729  
  6. Iteration 1:   log likelihood = -26.244843  
  7. Iteration 2:   log likelihood = -25.997325  
  8. Iteration 3:   log likelihood = -25.996347  
  9. Iteration 4:   log likelihood = -25.996347  

  10. Probit regression                               Number of obs     =         69
  11.                                                 LR chi2(2)        =      32.81
  12.                                                 Prob > chi2       =     0.0000
  13. Log likelihood = -25.996347                     Pseudo R2         =     0.3869

  14. ------------------------------------------------------------------------------
  15.      foreign |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  16. -------------+----------------------------------------------------------------
  17.          mpg |   .0676179   .0385219     1.76   0.079    -.0078836    .1431195
  18.        rep78 |   .9620267   .2637375     3.65   0.000     .4451107    1.478943
  19.        _cons |  -5.498954   1.118357    -4.92   0.000    -7.690893   -3.307015
  20. ------------------------------------------------------------------------------

  21. . est store e1

  22. . probit foreign weight rep78,

  23. Iteration 0:   log likelihood = -42.400729  
  24. Iteration 1:   log likelihood = -20.027174  
  25. Iteration 2:   log likelihood = -18.935849  
  26. Iteration 3:   log likelihood = -18.909413  
  27. Iteration 4:   log likelihood =  -18.90934  
  28. Iteration 5:   log likelihood =  -18.90934  

  29. Probit regression                               Number of obs     =         69
  30.                                                 LR chi2(2)        =      46.98
  31.                                                 Prob > chi2       =     0.0000
  32. Log likelihood =  -18.90934                     Pseudo R2         =     0.5540

  33. ------------------------------------------------------------------------------
  34.      foreign |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  35. -------------+----------------------------------------------------------------
  36.       weight |  -.0013236   .0003895    -3.40   0.001     -.002087   -.0005603
  37.        rep78 |   .7999689   .2821778     2.83   0.005     .2469105    1.353027
  38.        _cons |   .1849076   1.632959     0.11   0.910    -3.015633    3.385449
  39. ------------------------------------------------------------------------------

  40. . est store e2

  41. . suest e1 e2

  42. Simultaneous results for e1, e2

  43.                                                 Number of obs     =         69

  44. ------------------------------------------------------------------------------
  45.              |               Robust
  46.              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  47. -------------+----------------------------------------------------------------
  48. e1_foreign   |
  49.          mpg |   .0676179   .0402497     1.68   0.093      -.01127    .1465058
  50.        rep78 |   .9620267   .2551642     3.77   0.000      .461914    1.462139
  51.        _cons |  -5.498954   1.303945    -4.22   0.000    -8.054639   -2.943268
  52. -------------+----------------------------------------------------------------
  53. e2_foreign   |
  54.       weight |  -.0013236   .0003331    -3.97   0.000    -.0019764   -.0006708
  55.        rep78 |   .7999689   .2880474     2.78   0.005     .2354064    1.364531
  56.        _cons |   .1849076   1.405407     0.13   0.895     -2.56964    2.939455
  57. ------------------------------------------------------------------------------

  58. . test [e1_foreign]mpg=[e2_foreign]weight

  59. ( 1)  [e1_foreign]mpg - [e2_foreign]weight = 0

  60.            chi2(  1) =    2.89
  61.          Prob > chi2 =    0.0889
复制代码
已有 1 人评分经验 收起 理由
Captain-CUI + 20 热心帮助其他会员

总评分: 经验 + 20   查看全部评分

报纸
15271844450 发表于 2016-8-29 15:32:16
黃河泉 发表于 2016-8-29 15:21
网路上有人建议下列作法(我还需要进一步了解),让你做个参考:

end of do-file

. do "C:\Users\lenovo\AppData\Local\Temp\STD01000000.tmp"

. est store m2

.
end of do-file

. do "C:\Users\lenovo\AppData\Local\Temp\STD01000000.tmp"

. suest m1 m2
unable to generate scores for model m1
suest requires that predict allow the score option
r(322);

end of do-file
昨天就是这样做的,但是一直不行

地板
黃河泉 在职认证  发表于 2016-8-29 16:24:09
15271844450 发表于 2016-8-29 15:32
end of do-file

. do "C:\Users\lenovo\AppData\Local\Temp\STD01000000.tmp"
如同我的例子,请把你要跑回归写在同一个程序里!这样根本不知道你在做什么?

7
15271844450 发表于 2016-8-29 17:19:10
黃河泉 发表于 2016-8-29 16:24
如同我的例子,请把你要跑回归写在同一个程序里!这样根本不知道你在做什么?
请问你的用是面板probit么?

8
15271844450 发表于 2016-8-29 17:20:24
黃河泉 发表于 2016-8-29 16:24
如同我的例子,请把你要跑回归写在同一个程序里!这样根本不知道你在做什么?
*回归分析
xtset scode year
xtprobit aopinion fscore size leve glodebt cfot mkbk big4 reportlag priorgc indep
est store m1
xtprobit bruptcy fscore size leve glodebt cfot mkbk big4 reportlag priorgc indep
est store m2
logout, save(test) excel replace:esttab m1 m2 ,scalar(N Pseudo-R2) compress star(* 0.1 ** 0.05 *** 0.01)
*进行模型的系数的差异检验
suest m1 m2
test[m1_mean]fscore=[m2_mean]fscore
以上就是我的整个过程

9
黃河泉 在职认证  发表于 2016-8-29 17:54:47
15271844450 发表于 2016-8-29 17:20
*回归分析
xtset scode year
xtprobit aopinion fscore size leve glodebt cfot mkbk big4 reportlag p ...
  • 的确,方法似乎不是用面板资料!
  • 不过我很想知道,这样检定跨回归之系数是否一样有什么经济意义?

10
蓝色 发表于 2016-8-29 21:46:15
是的

能不能用suest命令 需要看help或manual里面的介绍

如果里面没有写能,那就没法


Title

    [XT] xtprobit postestimation -- Postestimation tools for xtprobit


Description

    The following postestimation commands are available after xtprobit:

    Command              Description
    --------------------------------------------------------------------------------------------
        contrast         contrasts and ANOVA-style joint tests of estimates
    (1) estat ic         Akaike's and Schwarz's Bayesian information criteria (AIC and BIC)
        estat summarize  summary statistics for the estimation sample
        estat vce        variance-covariance matrix of the estimators (VCE)
        estimates        cataloging estimation results
    (2) forecast         dynamic forecasts and simulations
        lincom           point estimates, standard errors, testing, and inference for linear
                           combinations of coefficients
        lrtest           likelihood-ratio test
        margins          marginal means, predictive margins, marginal effects, and average
                           marginal effects
        marginsplot      graph the results from margins (profile plots, interaction plots, etc.)
        nlcom            point estimates, standard errors, testing, and inference for nonlinear
                           combinations of coefficients
        predict          predictions, residuals, influence statistics, and other diagnostic
                           measures
        predictnl        point estimates, standard errors, testing, and inference for
                           generalized predictions
        pwcompare        pairwise comparisons of estimates
        test             Wald tests of simple and composite linear hypotheses
        testnl           Wald tests of nonlinear hypotheses
    --------------------------------------------------------------------------------------------
    (1) estat ic is not appropriate after xtprobit, pa.
    (2) forecast is not appropriate with mi estimation results.


很明显,probit的help里面有surest
而xtprobit对应的里面是没有surest命令的
当然没法执行了。

能不能执行suest不是自己想执行就能执行,是需要看软件人家程序写好了没有

Title

    [R] probit postestimation -- Postestimation tools for probit


Description

    The following postestimation commands are of special interest after probit:

    Command               Description
    --------------------------------------------------------------------------------------------
    estat classification  report various summary statistics, including the classification table
    estat gof             Pearson or Hosmer-Lemeshow goodness-of-fit test
    lroc                  compute area under ROC curve and graph the curve
    lsens                 graph sensitivity and specificity versus probability cutoff
    --------------------------------------------------------------------------------------------
    These commands are not appropriate after the svy prefix.

    The following standard postestimation commands are also available:

    Command                 Description
    --------------------------------------------------------------------------------------------
        contrast            contrasts and ANOVA-style joint tests of estimates
        estat ic            Akaike's and Schwarz's Bayesian information criteria (AIC and BIC)
        estat summarize     summary statistics for the estimation sample
        estat vce           variance-covariance matrix of the estimators (VCE)
        estat (svy)         postestimation statistics for survey data
        estimates           cataloging estimation results
    (1) forecast            dynamic forecasts and simulations
        hausman             Hausman's specification test
        lincom              point estimates, standard errors, testing, and inference for linear
                              combinations of coefficients
        linktest            link test for model specification
    (2) lrtest              likelihood-ratio test
        margins             marginal means, predictive margins, marginal effects, and average
                              marginal effects
        marginsplot         graph the results from margins (profile plots, interaction plots,
                              etc.)
        nlcom               point estimates, standard errors, testing, and inference for
                              nonlinear combinations of coefficients
        predict             predictions, residuals, influence statistics, and other diagnostic
                              measures
        predictnl           point estimates, standard errors, testing, and inference for
                              generalized predictions
        pwcompare           pairwise comparisons of estimates
        suest               seemingly unrelated estimation
        test                Wald tests of simple and composite linear hypotheses
        testnl              Wald tests of nonlinear hypotheses
    --------------------------------------------------------------------------------------------
    (1) forecast is not appropriate with mi or svy estimation results.




已有 1 人评分经验 收起 理由
Captain-CUI + 20 精彩帖子

总评分: 经验 + 20   查看全部评分

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-2 06:16