version 10.0 log using chap01, replace use cps_small, clear *-------------------------------------------------------------- * this is a comment * these commands presume you have changed to the working * directory * use the clear option if previous work in memory can be erased *-------------------------------------------------------------- summarize summarize wage, detail summarize if exper >= 10 summarize in 1/50 summarize wage in 1/50, detail summarize wage if female == 1 in 1/500, detail histogram wage, percent title(Histogram of wage data) more *------------------------------------------------------ * the above command -more- causes execution of * the Do-file to pause so that the histogram can * be inspected before the next command is carried out * Press the space bar to continue *------------------------------------------------------ * Computing normal probabilities scalar phi = normal(1.27) di phi display phi display "Prob (Z <= 1.27) = " phi di "Prob (Z <= 1.27) = " phi di "Prob (Z <= 1.27) = " normal(1.27) * Computing p-values scalar p = ttail(20,1.27) di "Prob (t(20) > 1.27) = " p di "Prob (t(20) > 1.27) = " ttail(20,1.27) * Computing critical values scalar z = invnormal(.90) di "90th percentile value of standard normal " z scalar t = invttail(20,.10) di "90th percentile value of t(20) distribution " t log close