公卫百科  > 所属分类  >  Stata   
[0] 评论[0] 编辑

Do File

 Do files
Once you become familiar with the Stata commands described below, I strongly urge you to use a “do” file rather than type each command separately into Stata. This will allow you to easily correct mistakes in your programming and to add commands as you work through a problem set question. To create a do file, open a text editor like notepad or wordpad and give the file a name with a .do extension. For example, open a file and name it ps1.do 公卫百科
A do file is simply a list of Stata commands you want Stata to implement in the order they are listed. An example do file is on the course webpage: hprice2.do and this file uses data in the file hprice2.dta . There are a few commands that are useful to always place at the beginning of a do file and if you are saving the output in a log file (a really good idea), the end of the do file should close the log file. See hprice2.do for details.

公卫考场


To have Stata execute a do file, click on the File menu, click on the Do button and a file directory will appear. Find your do file and click on the name. Then click the Open button and Stata will run your list of commands in the do file.
公卫百科

If you want to edit a do file, you can use “view” from the “File” pulldown menu in Stata. Alternatively, go the directory where your do file 公卫考场

附件列表


0

词条内容仅供参考,如果您需要解决具体问题
(尤其在法律、医学等领域),建议您咨询相关领域专业人士。

如果您认为本词条还有待完善,请 编辑

上一篇 韩梦杰    下一篇 IV Estimation (Two Stage Least Squares)

标签

暂无标签

同义词

暂无同义词