// batch version of tutorial do file // 26 Mayu 2003 // version 8 set scheme s2manual set more off capture log close log using ch2tutorial, replace // * load and describe the data use science2, clear describe // * check variable work sum work tab work, missing codebook work dotplot work graph export 02dotplot2.eps, replace // * saved graph as work.wmf // * dummy variable indicating faculty gen isfac = (work==1) if work<. tab isfac work, missing label variable isfac "1=Faculty in University" label define isfac 0 "NotFac" 1 "Faculty" label values isfac isfac tab isfac // * clean and recode job variable tab job, missing gen jobprst=job recode jobprst .=. 1/1.99=1 2/2.99=2 3/3.99=3 4/5=4 label variable jobprst "Rankings of University Job" label define prstlbl 1 "Adeq" 2 "Good" 3 "Strong" 4 "Dist" label values jobprst prstlbl tab jobprst, missing // * create total publications variable gen pubsum=pub3+pub6+pub9 label variable pubsum "Total Pubs in 9 Yrs post-Ph.D." sum pub3 pub6 pub9 pubsum graph matrix pubsum pub3 pub6 pub9, half graph export 02matrix.eps, replace // * save the new data save sciwork, replace // * close the log log close