楼主: 稳健天涯哥
11639 2

[回归分析求助] 系统回归后,想用Adjust预测某一个y的值,求教相关的stata命令 [推广有奖]

  • 0关注
  • 0粉丝

等待验证会员

高中生

92%

还不是VIP/贵宾

-

威望
0
论坛币
7 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
153 点
帖子
15
精华
0
在线时间
56 小时
注册时间
2018-7-8
最后登录
2024-1-10

楼主
稳健天涯哥 发表于 2019-3-8 01:00:21 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
做了一个sureg,y1 y2 y3分别对x1 x2 x3 x4 x5 x6回归,想知道x1=a  x2=b  x3=c  x4=d x5=e  x6=f时,y1 y2 y3的预测值分别是多少, 输入命令 adjust x1=a  x2=b  x3=c  x4=d x5=e  x6=f , se ci 后,仅能看到y1的均值,怎么看到y2 y3的呢?

小白求stata不吝赐教,非常感谢!

二维码

扫码加我 拉你入群

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

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

关键词:预测值分 预测值

回帖推荐

蓝色 发表于2楼  查看完整内容

沙发
蓝色 发表于 2019-3-8 12:37:46
  1. . sysuse auto
  2. (1978 Automobile Data)

  3. . sureg (price foreign weight length)    ///
  4. >       (mpg   foreign weight       )    ///
  5. >           (displ foreign weight       )

  6. Seemingly unrelated regression
  7. --------------------------------------------------------------------------
  8. Equation             Obs   Parms        RMSE    "R-sq"       chi2        P
  9. --------------------------------------------------------------------------
  10. price                 74       3    1967.769    0.5488      89.74   0.0000
  11. mpg                   74       2    3.337283    0.6627     145.39   0.0000
  12. displacement          74       2    39.60002    0.8115     318.62   0.0000
  13. --------------------------------------------------------------------------

  14. ------------------------------------------------------------------------------
  15.              |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
  16. -------------+----------------------------------------------------------------
  17. price        |
  18.      foreign |    3575.26   621.7961     5.75   0.000     2356.562    4793.958
  19.       weight |   5.691462   .9205043     6.18   0.000     3.887307    7.495618
  20.       length |  -88.27114    31.4167    -2.81   0.005    -149.8467   -26.69554
  21.        _cons |   4506.212   3588.044     1.26   0.209    -2526.225    11538.65
  22. -------------+----------------------------------------------------------------
  23. mpg          |
  24.      foreign |  -1.650029   1.053958    -1.57   0.117    -3.715748    .4156902
  25.       weight |  -.0065879   .0006241   -10.56   0.000     -.007811   -.0053647
  26.        _cons |    41.6797   2.121197    19.65   0.000     37.52223    45.83717
  27. -------------+----------------------------------------------------------------
  28. displacement |
  29.      foreign |   -25.6127   12.50621    -2.05   0.041    -50.12441   -1.100984
  30.       weight |   .0967549   .0074051    13.07   0.000     .0822411    .1112686
  31.        _cons |  -87.23548   25.17001    -3.47   0.001    -136.5678   -37.90317
  32. ------------------------------------------------------------------------------

  33. . margins , predict(equation(price))   ///
  34. >           predict(equation(mpg)  )    ///
  35. >                   predict(equation(displacement))   ///
  36. >                   at(weight=2000 foreign=1 length=100)

  37. Adjusted predictions                            Number of obs     =         74

  38. 1._predict   : Linear prediction, predict(equation(price))
  39. 2._predict   : Linear prediction, predict(equation(mpg))
  40. 3._predict   : Linear prediction, predict(equation(displacement))
  41. at           : foreign         =           1
  42.                weight          =        2000
  43.                length          =         100

  44. ------------------------------------------------------------------------------
  45.              |            Delta-method
  46.              |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
  47. -------------+----------------------------------------------------------------
  48.     _predict |
  49.           1  |   10637.28   1936.479     5.49   0.000     6841.852    14432.71
  50.           2  |    26.8539   .7383192    36.37   0.000     25.40682    28.30098
  51.           3  |   80.66153   8.760856     9.21   0.000     63.49057     97.8325
  52. ------------------------------------------------------------------------------

  53. .
  54. . margins , predict(equation(price))   ///
  55. >           predict(equation(mpg)  )    ///
  56. >                   predict(equation(displacement))   ///
  57. >                   at(weight=0 foreign=0 length=0)                 

  58. Adjusted predictions                            Number of obs     =         74

  59. 1._predict   : Linear prediction, predict(equation(price))
  60. 2._predict   : Linear prediction, predict(equation(mpg))
  61. 3._predict   : Linear prediction, predict(equation(displacement))
  62. at           : foreign         =           0
  63.                weight          =           0
  64.                length          =           0

  65. ------------------------------------------------------------------------------
  66.              |            Delta-method
  67.              |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
  68. -------------+----------------------------------------------------------------
  69.     _predict |
  70.           1  |   4506.212   3588.044     1.26   0.209    -2526.225    11538.65
  71.           2  |    41.6797   2.121197    19.65   0.000     37.52223    45.83717
  72.           3  |  -87.23548   25.17001    -3.47   0.001    -136.5678   -37.90317
  73. ------------------------------------------------------------------------------
复制代码


藤椅
稳健天涯哥 发表于 2019-3-8 14:03:08
非常感谢亲,我想我看懂了,我这去试试。另外亲用predict 和单方程时我用adjust都能找到y的预测值,那么predict\adjust两个命令有什么区别呢?期待您的回复哦

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

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