全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
匿名
2922 3
2013-04-20
悬赏 10 个论坛币 已解决
命令如下:
sysuse sp500,clear
gen n=_n
twoway(line open close n in 1/50,sort clpattern(-)),plotregion(margin(zero)) title("twoway line") xtitle("date") ytitle("price") legend(label(1 "open") label(2 "close") order(2 1) ring(0) pos(8)) text(1300 25 "open")
怎样把命令改成:

sysuse sp500,clear
gen n=_n
twoway(line open close n in 1/50,sort clpattern(-))
,
plotregion(margin(zero))
title("twoway line")
xtitle("date")
ytitle("price")
legend(label(1 "open") label(2 "close") order(2 1) ring(0) pos(8))
text(1300 25 "open")
而不改变得出的结果啊?


最佳答案

jonathanjp 查看完整内容

--------------------begin myfile1.do-------------------- #delimit ; sysuse sp500,clear; gen n=_n; twoway(line open close n in 1/50,sort clpattern(-)) , plotregion(margin(zero)) title("twoway line") xtitle("date") ytitle("price") legend(label(1 "open") label(2 "close") order(2 1) ring(0) pos(8)) text(1300 25 "open") ; #delimit cr --------------------end myfile1.do---------------- ...
二维码

扫码加我 拉你入群

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

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

全部回复
2013-4-20 17:06:32
--------------------begin myfile1.do--------------------
#delimit ;
sysuse sp500,clear;
gen n=_n;
twoway(line open close n in 1/50,sort clpattern(-))
,
plotregion(margin(zero))
title("twoway line")
xtitle("date")
ytitle("price")
legend(label(1 "open") label(2 "close") order(2 1) ring(0) pos(8))
text(1300 25 "open")
;
#delimit cr
--------------------end myfile1.do----------------------

Note that the above code can only be used within a .do or .ado file.

For more information, please refer to help delimit..
二维码

扫码加我 拉你入群

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

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

-->
jonathanjp 发表于 2013-4-20 17:24
--------------------begin myfile1.do--------------------
#delimit ;
sysuse sp500,clear;
原来如此,谢谢啦,不过这不能直接在命令窗口输入吗?
二维码

扫码加我 拉你入群

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

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

2013-4-20 17:34:32
平军 发表于 2013-4-20 17:31
原来如此,谢谢啦,不过这不能直接在命令窗口输入吗?
在命令窗口直接输入是不行的。
二维码

扫码加我 拉你入群

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

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

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

分享

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