楼主: ywh19860616
2010 2

画图 [推广有奖]

已卖:3份资源

学术权威

32%

还不是VIP/贵宾

-

威望
0
论坛币
725 个
通用积分
4238.2536
学术水平
864 点
热心指数
1001 点
信用等级
646 点
经验
116372 点
帖子
3968
精华
0
在线时间
7743 小时
注册时间
2009-9-3
最后登录
2025-9-7

楼主
ywh19860616 发表于 2011-1-10 19:57:19 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
呵呵,谢谢版主了,我看到您一个帖子帮另外一个同学画了分位数回归图形,但是我用您程序,保存成do文件,怎么运行出错,您帮我看下
原帖:http://www.pinggu.org/bbs/thread-782614-1-1.html

修改后程序:
preserve
loc s=0
mat b=J(19,4,.)
forv i=0.05(0.05)1{
loc s=`s'+1
sysuse auto
qreg price weight, q(`i')
predictnl b=_b[weight], ci(lo up)
mat b[`s',1]=`i'
mat b[`s',2]=b[1]
mat b[`s',3]=lo[1]
mat b[`s',4]=up[1]
drop b l u
}
clear
svmat b
tw rarea b3 b4 b1||scatter b2 b1,c(l)
restore
二维码

扫码加我 拉你入群

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

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

关键词:predictnl preserve Reserve predict Scatter 版主 请教 画图 sungmoo

沙发
ywh19860616 发表于 2011-1-10 20:01:08
. do rqq.do

. preserve

. loc s=0

. mat b=J(19,4,.)

. forv i=0.05(0.05)1{
  2. loc s=`s'+1
  3. sysuse auto
  4. qreg price weight, q(`i')
  5. predictnl b=_b[weight], ci(lo up)
  6. mat b[`s',1]=`i'
  7. mat b[`s',2]=b[1]
  8. mat b[`s',3]=lo[1]
  9. mat b[`s',4]=up[1]
10. drop b l u
11. }
(1978 Automobile Data)
Iteration  1:  WLS sum of weighted deviations =   48693.16

Iteration  1: sum of abs. weighted deviations =  50260.544
Iteration  2: sum of abs. weighted deviations =  42543.843
Iteration  3: sum of abs. weighted deviations =  35285.323
Iteration  4: sum of abs. weighted deviations =   19960.36
Iteration  5: sum of abs. weighted deviations =  18702.012
Iteration  6: sum of abs. weighted deviations =    18656.3

.05 Quantile regression                              Number of obs =        74
  Raw sum of deviations  19975.1 (about 3667)
  Min sum of deviations  18656.3                     Pseudo R2     =    0.0660

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |   .4969697   .0910901     5.46   0.000      .315385    .6785544
       _cons |   2250.394   254.9876     8.83   0.000     1742.085    2758.702
------------------------------------------------------------------------------
Warning: prediction constant over observations; perhaps you meant to run nlcom.
note: Confidence intervals calculated using t(72) critical values.
l ambiguous abbreviationr(111);

end of do-file

r(111);
运行结果

藤椅
苏幕遮Doris 发表于 2022-3-15 17:04:54
请问楼主解决了吗?我也遇到了同样的问题。

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

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