全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1356 1
2023-03-04
program chi2data,rclass
  1. version 16.0
  2. drop_all
  3. set obs 30
  4. tempvar x y
  5. gen double `x' = rchi2(1)
  6. gen `y' = 1 + 2*`x' + rchi2(1) - 1
  7. reg `y' `x'
  8. return scalar t2=(_b[`x'-2]/_se[`x'])
  9. return scalar r2=abs(return(t2))>invttail(28,0.025)
10. end

. simulate reject=r(r2),reps(1000) seed(101):chi2data
command drop_all is unrecognized
an error occurred when simulate executed chi2data


二维码

扫码加我 拉你入群

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

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

全部回复
2023-3-4 20:23:09
我知道错误在哪里了,drop后面有个空格我没有打出来
drop _all

还有就是第8行代码抄错了,括号没整对。
但是主要还是drop后面空格的问题!!!啊啊啊,可算是
二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群