-
6
pages
-
English
-
Documents
Description
Stata Tutorial First, go to Professor Berman’s website: http://www.econ.ucsd.edu/~elib/120b/ and download the coffee.dta file (right click and save it somewhere) Second, open Stata (Go to the Start Menu and find Stata). You should see: - The output window - The command window - The review of commands - The variable list *Clickability: using your mouse to click on any variable in the variable list will automatically enter it into the command window. Similarly, clicking on any past command in the review of commands will also automatically enter it into the command window. In the examples below, the basic Stata commands are in bold and you type them into the command window. Remember that some of the examples (such as loading the data) require you to enter your own parts of commands (e.g. a file name when loading the data). Loading Data If in Stata Format (like our coffee data): use "C:\Documents and Settings\Leah\My Documents\UCSD\Econ 120B - W 08\coffee08.dta", clear ** Remember that you must include quotation marks (“s) around your file name If in Excel or text format (i.e. notepad): insheet using "C:\Documents and Settings\Leah\My Documents\UCSD\Econ 120B - W 08\coffee.txt" insheet usingDocuments\UCSD\Econ 120B - W 08\coffee.csv" ** Remember that Excel data MUST be saved in the .csv format (“save as”, if not already in that format). You can also enter the data manually (or copy and paste from Excel or almost any ...
-
Publié par
-
Langue
English