Econ1002StataGuide

Econ1002StataGuide - Guide to Stata Econ B003 Applied...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Guide to Stata Econ B003 –Applied Economics To configure Stata in your account: o Login to WTS (use your Cluster WTS password) o Double-click in the folder Applications and Resources o Double-click in the folder Unix Applications o Double-click in Setup Exceed (type any key) o Double-click in the Stata icon (use your main UCL password, i.e. e-mail password) NOTE: Stata in the WTS environment directly sets up your personal path and there is no need to specify it for any of the files that will be opened or saved during this session (you can see the current working path that Stata is using in the bottom-left corner of the Window) 1. OPENING DATA SETS, LOG-FILES, DO-FILES To open a log-file log using [ path for the file ]/class1 . log, replace o This command opens a file with extension .log, where it keeps records of what you have done and the results of the commands that you have executed. o These files can be opened later on with any editor (MS Word, for example) o Before opening any log-file you will need to close any other log-file that you may have opened. log off log on log close log using [ path for the file ]/class1 . log, append To open a Stata data set file: .dta use [ path for the file ]/income.dta To save a Stata data set file once it has been modified save [ path for the file ]/income.dta, replace This saves the changes that have been made in the original data set. If you want to keep the original data set, you must type a different name for the data set (e.g. income2.dta). The extension .dta is assumed by Stata. To clear the memory clear
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 If the data set has not been saved before doing clear , the changes will be lost and only the changes done before saving the data set will be saved. Do-files Sometimes you will find it useful to write all the commands in a text processor and then ask Stata to execute all the commands that you have written in this file. You can do this using do-files. An advantage of these files is that you can use the same file as many times as you want and you do not need to write the commands in the Command window every time you want to execute them. In addition, you can add comment lines to the file to describe what you are doing in each step. In order to insert a comment, put /* at the beginning of the comment and */ after the comment. Stata will ignore what it is written between these two symbols.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/03/2010 for the course ECON 1002 taught by Professor Matthewwakefield during the Spring '09 term at UCL.

Page1 / 7

Econ1002StataGuide - Guide to Stata Econ B003 Applied...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online