This preview shows page 1. Sign up to view the full content.
Unformatted text preview: 9) list in 1/20 Lists data for all variables between observation1 and observation 20. 10) list testscr str expn_stu el_pct in 1/20 Lists data for str, expn_stu and el_pct between observation1 and observation 20. 11) generate D=0 Generates a new variable D which takes value 0 for all observations 12) generate str2=str^2 Generates a new variable named str2 which is square of str. 13) replace D=0 Replaces the value of D by 0 for all observations. 14) replace D=1 if str&lt;=20 Replaces the values of D by 1 if the corresponding value of the variable str is less than or equal to 20. (This command together with generate is particularly useful to construct Dummy variables in STATA) 15) tab D Tabulates the values of the variable D ( It is meaningful if we have a discrete random variable, for instance if we run t ab D , we will get the percentage of 0 and 1 in D)....
View Full Document
This note was uploaded on 07/02/2009 for the course ECON 1150 taught by Professor Staff during the Summer '08 term at Pittsburgh.
- Summer '08