Introduction to STATA 10.0:The Beginners Manual.doc

  1. 1、本文档共21页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Introduction to STATA 10.0:The Beginners Manual

Introduction to STATA 10.0 The Beginners Manual Originally provided by Prof. Woochan Kim Chapter 1. Start STATA Run STATA Double click the ‘STATA 10.0’ icon in the Window. Define Directory . cd Show the current directory. . cd c:\mydata Change the directory to the one where you will save the data and output files. Create Output File (LOG File) . capture log close Close log files, if any, currently open. . log using c:\stata10\mylog, text Create a new log file on the directory c:\stata10 under the file name ‘mylog’ in ‘text’ format (mylog.txt). A log file saves all results (including STATA commands you have used) for review. You can copy and paste the results directly from the STATA window or open it using either Notepad or MSWord. . log using c:\stata10\mylog, text replace Replace the old log file, ‘mylog’, saved already with the updated one under the same log file name. . log close Close the current log file. Any commands and results are saved in the log file, ‘mylog’, before closing. . log off Temporarily stop the log file. . log on Restart the log file. Create Command File (DO File) Open do-file editor Type in commands that you want to execute sysuse auto, clear log using c:\stata10\mylog1, text reg mpg length weight foreign sort foreign by foreign: reg mpg length weight foreign log close Save the file with an extension “do.” For example, c:\stata10\mydo.do . do c:\stata10\mydo.do (or run c:\stata10\mydo.do) Execute the do file, ‘mydo’. Run is different in that it does not display the execution on the screen Use “do” instead of “run” when generating a log file Chapter 2. Data Input There are three ways to enter data into STATA. Load a data set . use smoke.dta, clear Load the dataset ‘smoke.dta’ (which should be saved in a STATA-format) in the memory and clear other data in use from the memory. Data in an Excel format Copy the selected cells in Excel, open the STATA editor, place the cursor on the cell that will be the upper left corner, and paste. T

文档评论(0)

xcs88858 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

版权声明书
用户编号:8130065136000003

1亿VIP精品文档

相关文档