This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: STATA Problem Set #2- Mann B30A The data sets and the data set descriptions are available on Blackboard. Note that they are also available online: http://wps.aw.com/aw_stock_ie_2/50/13016/3332253.cw/index.html These instructions pertain to the computers in Mann computer lab B30A. If you are in Mann B30B, you would need to change B30A to B30B in all of your commands. Sample problem: TeachingRatings_ps2.do 1) Download TeachingRatings.dta (STATA data file) from Blackboard to the My Documents folder (right-click on file and save): "C:\Documents and Settings\B30A\My Documents\TeachingRatings.dta" 2) Download TeachingRatings_ps2.do from Blackboard to the My Documents folder (right-click on file and save). A STATA do file lists the commands that STATA will execute. Right-click the file and open it with Notepad to read or edit the file. 3) Run TeachingRatings_ps2.do (open STATA, select File, select Do, and select TeachingRatings_ps2.do). 4) Open TeachingRatings_ps2_output.log. The log file is the output file that was created when we ran the do file. We instructed STATA to save the log file in the My Documents folder. Right-click the file and open it with Notepad. Read over the output to see what the commands in TeachingRatings_ps2.do mean. You will need to use similar commands to complete this problem set. 5) Close STATA (black screen) before you run another do file. Type your answers in a Word document. Put your name and the time your lecture meets at the top. Problem #1 1) Download caschool.dta (STATA data file) from Blackboard to the My Documents folder (right-click on file and save): "C:\Documents and Settings\B30A\My Documents\caschool.dta" 2) Now we have to create a new do file. Lets call our new do file caschool_ps2.do. The easiest way to do this is to edit TeachingRatings_ps2.do and then save the new do file as caschool_ps2.do. Right-click on TeachingRatings_ps2.do and open with Notepad. Now save the file as: File name: caschool_ps2.do (need to type in the suffix .do) Save as type: Text Only or Text Document 3) Then keep these commands, delete everything else, and save again: # delimit; log using "C:\Documents and Settings\B30A\My Documents\ TeachingRatings_ps2_output.log", replace; use "C:\Documents and Settings\B30A\My Documents\TeachingRatings.dta"; sum; log close; 4) Now, just replace TeachingRatings with caschool and save again....
View Full Document
This note was uploaded on 02/01/2010 for the course PAM 2100 taught by Professor Abdus,s. during the Spring '08 term at Cornell University (Engineering School).
- Spring '08