楼主: somnusspy
1289 1

[数据管理求助] Files can't be found [推广有奖]

  • 0关注
  • 0粉丝

高中生

0%

还不是VIP/贵宾

-

威望
0
论坛币
500 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
8 点
帖子
0
精华
0
在线时间
42 小时
注册时间
2016-9-7
最后登录
2022-7-27

楼主
somnusspy 发表于 2016-11-25 13:22:22 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
简单来说就是i和c都没法按正常取值,会不会和stata的版本有关。其它教授用同样的do file已经得出结果。。心塞。。。求助
第一次发帖,不知道对不对版块。。。

I am running this do file for a professor, and he said other professors already sucessfully got the result using it. However, when I wanna use the do file, it is showing "files
ResultsAN_.dta can't be found".

What is wrong is that the file name does not take values into i and c, which they defined using the "foreach" command.
(in the previous simulations, I got a bunch of dta named ResultsAN_1_10C or ResultsAN_1_25NC and so on)

Does anyone know how to fix it?? Thanks!

local v=6
cd "I:\p\PS\Simulation"
log using "montecarlo.txt", replace
foreach i in 1_10 1_25 1_50 2_10 2_25 2_50 3_10 3_25 3_50 {

foreach c in NC C {
qui putexcel B2=("New AN Dummy") using MonteCarloResultsV`v', sheet("`i' + `c'") modify
qui putexcel C2=("New VC Dummy") using MonteCarloResultsV`v', sheet("`i' + `c'") modify


** Directory #1

use "I:\p\PS\Simulation\ResultsAN_`i'`c'.dta"
ttest coef==0 if var=="AN_anyrd"
return list
qui putexcel B3=(r(mu_1)) using MonteCarloResultsV`v', sheet("`i' + `c'") modify


二维码

扫码加我 拉你入群

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

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

关键词:found Files file Fou und previous command running already result

沙发
夏目贵志 发表于 2016-11-26 12:20:25
那边有人已经答了。发个链接
http://www.statalist.org/forums/forum/general-stata-discussion/general/1365649-files-can-t-be-found
供大家参考

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

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