___ ____ ____ ____ ____ tm /__ / ____/ / ____/ ___/ / /___/ / /___/ 8.0 Copyright 1984-2003 Statistics/Data Analysis Stata Corporation 4905 Lakeway Drive College Station, Texas 77845 USA 800-STATA-PC http://www.stata.com 979-696-4600 stata@stata.com 979-696-4601 (fax) 5-user Stata for Sun (network) perpetual license: Serial number: 580524482 Licensed to: University of North Carolina at Greensboro Greensboro Notes: 1. (-m# option or -set memory-) 1.00 MB allocated to data 2. Command line editing disabled 3. Stata running in batch mode Note: Your site can add messages to the introduction by editing the file stata.msg in the directory where Stata is installed. . do x1 . #delimit; delimiter now ; . clear; . capture log close; . log using m2.log, replace; ------------------------------------------------------------------------------- log: /afs/uncg.edu/html/bae/people/rosenbaum/643/m2.log log type: text opened on: 18 Oct 2005, 05:44:51 . *********************************************************** > M2.DO is a STATA do-file used for midterm 2. > - written by Dan Rosenbaum, 2003 > > Located at my website course > (http://www.uncg.edu/bae/people/rosenbaum) is a space-delimited > file (card.raw) containing individual-level data from the U.S. > in 1976. The variables are as follows. > > 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 14 > 10. sinmom14 =1 if with single mom at 14 > 11. step14 =1 if with step parent at 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 14 > 32. exper age - educ - 6 > 33. lwage log(wage) > 34. expersq exper^2 > > - written by Dan Rosenbaum, 2004 > ***********************************************************; . *********************************************************** > 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; (3010 observations read) . sum; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- id | 3010 2581.749 1500.539 2 5225 nearc2 | 3010 .4408638 .4965731 0 1 nearc4 | 3010 .6820598 .4657535 0 1 educ | 3010 13.26346 2.676913 1 18 age | 3010 28.1196 3.137004 24 34 -------------+-------------------------------------------------------- fatheduc | 2320 10.00345 3.720737 0 18 motheduc | 2657 10.34814 3.179671 0 18 weight | 3010 321185.3 170645.8 75607 1752340 momdad14 | 3010 .7893688 .4078247 0 1 sinmom14 | 3010 .1006645 .3009339 0 1 -------------+-------------------------------------------------------- step14 | 3010 .0388704 .1933182 0 1 reg661 | 3010 .0465116 .2106253 0 1 reg662 | 3010 .1607973 .367405 0 1 reg663 | 3010 .1956811 .39679 0 1 reg664 | 3010 .0641196 .2450066 0 1 -------------+-------------------------------------------------------- reg665 | 3010 .2083056 .406164 0 1 reg666 | 3010 .0960133 .2946584 0 1 reg667 | 3010 .1099668 .3129003 0 1 reg668 | 3010 .0282392 .165683 0 1 reg669 | 3010 .0903654 .2867522 0 1 -------------+-------------------------------------------------------- south66 | 3010 .4142857 .4926801 0 1 black | 3010 .2335548 .4231624 0 1 smsa | 3010 .7129568 .4524571 0 1 south | 3010 .4036545 .4907113 0 1 smsa66 | 3010 .6495017 .4772053 0 1 -------------+-------------------------------------------------------- wage | 3010 577.2824 262.9583 100 2404 enroll | 3010 .0923588 .2895799 0 1 kww | 2963 33.54067 8.611619 4 56 iq | 2061 102.4498 15.42376 50 149 married | 3003 2.271395 2.066823 1 6 -------------+-------------------------------------------------------- libcrd14 | 2997 .674341 .4686987 0 1 exper | 3010 8.856146 4.141672 0 23 lwage | 3010 6.261832 .4437976 4.60517 7.784889 expersq | 3010 95.57907 84.61831 0 529 . tab married; married | Freq. Percent Cum. ------------+----------------------------------- 1 | 2,144 71.40 71.40 2 | 14 0.47 71.86 3 | 3 0.10 71.96 4 | 155 5.16 77.12 5 | 102 3.40 80.52 6 | 585 19.48 100.00 ------------+----------------------------------- Total | 3,003 100.00 . simulate , reps(1000): reg wage iq; , command not found r(111); end of do-file r(111);