STATA COMMANDS WE USED IN THE CLASS

# STATA COMMANDS WE USED IN THE CLASS - 9) list in 1/20 Lists...

This preview shows page 1. Sign up to view the full content.

STATA COMMANDS WE USED IN THE CLASS: 1) reg testscr str expn_stu el_pct ,robust Runs a linear regression of testcr on str, expn_stu and el_pct and uses heteroskedasticity adjusted standard errors 2) test str expn_stu el_pct You should use it after running the regression. Tests the joint hypothesis that coefficients on str expn_stu and el_pct are all equal to zero. 3) test (str=0) ( expn_stu=0) ( el_pct=0) Another way of writing the hypothesis in (3) 4) test (str= expn_stu= el_pct) Tests the joint hypothesis that coefficients on str expn_stu and el_pct are all equal to each other. 5) test (str=expn_stu) ( el_pct=0) Tests the joint hypothesis that coefficients on str and expn_stu are equal to each other and at the same time coefficient on el_pct is equal to 0. 6) sum If you just write sum and click enter, STATA gives you the summary of the all variables 7) sum testscr str expn_stu el_pct Gives you the summary of the variables testcr, str, expn_stu and el_pct 8) list Lists all data available for all variables starting from observation1.
This is the end of the preview. Sign up to access the rest of the document.

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&amp;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.

Ask a homework question - tutors are online