* ass6w07q4.do clear capture log close log using ass6w07q4.txt, text replace ** STATA Program by A. Colin Cameron for 240A ********** OVERVIEW OF ASS6W07Q4.DO ********** * IV example * To run this Stata program you need data and dictionary files * DATA66.dat ASCII data set * DATA66.dct Stata dictionary that labels variables ********** SETUP set more off version 8.0 set memory 20m set linesize 150 /* Permits long inputline commands with delimit */ set scheme s1mono ********** ORIGINAL DATA SOURCE * Program based on Kling Analys66.d0 September 2003 * written for Jeffrey R. Kling (2001) "Interpreting Instrumental Variables Estimates * of the Return to Schooling", Journal of Business and Economic Statistics, * July 2001, 19 (3), pp.358-364. * in turn based on * David Card (1995), "Using Geographic Variation in College Proximity to * Estimate the Returns to Schooling", in * Aspects of Labor Market Behavior: Essays in Honor of John Vanderkamp, * eds. L.N. Christofides et al., Toronto: University of Toronto Press, pp.201-221. ********** READ IN DATA infile using DATA66.dct, using(DATA66.dat) * save DATA66, replace ********** SELECT SAMPLE AND SUMMARIZE sum wage76 grade76 col4 * RETAIN cases for the analysis * Here drop if missing wages or missing schooling keep if wage76!=. & grade76!=. & col4!=. sum wage76 grade76 col4 * QUESTION 4 IV * OLS reg wage76 grade76 * First stage regression reg grade76 col4 * IV regression ivreg wage76 (grade76 = col4) * Indirect least squares reg wage76 col4 ********** CLOSE OUTPUT log close * clear * exit