全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1245 1
2016-11-25
简单来说就是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


二维码

扫码加我 拉你入群

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

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

全部回复
2016-11-26 12:20:25
那边有人已经答了。发个链接
http://www.statalist.org/forums/forum/general-stata-discussion/general/1365649-files-can-t-be-found
供大家参考
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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