全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
2552 0
2018-12-22
本人模型中有多个自变量和因变量指标,尝试使用双层的foreach循环,命令大致如下:
local independent "indep1 indep2"
foreach j of varlist `independent'{

center `j'
gen `j'_moderator  =c_`j'*moderator

local dependent "dep1 dep2"
foreach i of varlist `dependent'{

xtreg `i' control `j'est store m1xtreg `i' contorl `j' moderator `j'_moderator
est store m2
local mm "m1 m2 "
esttab `mm' using C:\Users\Desktop\output\`i'_`j'.rtf,mtitle(`mm') ///
s(N chi2 r2_w r2_o r2_b) replace compress nogap ///
star(* 0.1 ** 0.05 *** 0.01) b(%7.4f) se(%7.4f)
}
}

结果总是会在最后一步esttab时报错显示 invalid ``'

求问大神什么原因,如何解决,谢谢!




二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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