clear capture log close log using m2.log, replace /*********************************************************** M2.DO is a STATA do-file used for the take home exam. Located at my course web-site (http://www.uncg.edu/bae/people/rosenbaum/Eco643/main.html) is a space-delimited file (card.raw) containing individual-level data of males aged 24-34 from the U.S. in 1976 with an hourly wage of $1 per hour or greater. The variables are as follows. Note that I have included a stata do file (m2.do) to help you read in this data. 1. id person identifier 2. nearc2 =1 if near 2 yr college, 1966 3. nearc4 =1 if near 4 yr college, 1966 4. educ years of schooling, 1976 5. age in years 6. fatheduc father's schooling 7. motheduc mother's schooling 8. weight NLS sampling weight, 1976 9. momdad14 =1 if live with mom, dad at age 14 10. sinmom14 =1 if with single mom at age 14 11. step14 =1 if with step parent at age 14 12. reg661 =1 for region 1, 1966 13. reg662 =1 for region 2, 1966 14. reg663 =1 for region 3, 1966 15. reg664 =1 for region 4, 1966 16. reg665 =1 for region 5, 1966 17. reg666 =1 for region 6, 1966 18. reg667 =1 for region 7, 1966 19. reg668 =1 for region 8, 1966 20. reg669 =1 for region 9, 1966 21. south66 =1 if in south in 1966 22. black =1 if black 23. smsa =1 in in SMSA, 1976 24. south =1 if in south, 1976 25. smsa66 =1 if in SMSA, 1966 26. wage hourly wage in cents, 1976 27. enroll =1 if enrolled in school, 1976 28. KWW knowledge world of work score 29. IQ IQ score 30. married =1 if married, 1976 31. libcrd14 =1 if lib. card in home at age 14 32. exper age - educ - 6 33. lwage log(wage) 34. expersq exper^2 - written by Dan Rosenbaum, 2006 ***********************************************************/ /*********************************************************** I start by inputting the data using an INFILE statement, since the data is space-delimited rather than tab-delimited. I also calculate summary statistics for the sample. ***********************************************************/ infile id nearc2 nearc4 educ age fatheduc motheduc weight momdad14 sinmom14 step14 /// reg661 reg662 reg663 reg664 reg665 reg666 reg667 reg668 reg669 south66 black /// smsa south smsa66 wage enroll kww iq married libcrd14 exper lwage expersq /// using card sum