capture log close log using wf3-subsample, replace text // program: wf3-subsample.do \ for stata 9 // task: debugging with a small sample // project: workflow - chapter 3 // author: scott long \ 2008-10-24 // #0 // setup version 9.2 set linesize 80 clear // changed to clear all in stata 10 macro drop _all // #1 // load data use wf-lfp, clear // #2 // create a small random sample set seed 11020 generate isin = (uniform()>.8) // changed go runiform in stata 10 label var isin "1 if in random sample (seed 11020)" label def isin 0 0_NoIn 1 1_InSample label val isin isin keep if isin tabulate isin, missing // #3 // save the subsample label data "20% subsample of wf-lfp." note: wf3-subsample.do jsl 2008-10-24. save x-wf3-subsample, replace // #4 // try command using subsample logit lfp k5 k618 age wc hc lwg inc log close exit 2008-10-24 \ initial version for wf09-part#.pkg