Gary King Homepage Previous: How can I use Up: Frequently Asked Questions Next: How can I create

How did you generate the graphs in your paper?

$ {\mathfrak{C}}$larify does not automatically produce graphs. In order to produce a graph, such as Figure 1 from King, Tomz, and Wittenberg (2000), you will need to use Stata's graphics commands. The sequence of commands used to generate Figure 1 is:

generate plo = .
generate phi = .
generate ageaxis = _n + 17 in 1/78
setx educate 12 white 1 income mean
local a = 18
while `a' <= 95 {
   setx age `a' agesqrd (`a'^2)/100
   simqi, prval(1) genpr(pi)
   _pctile pi, p(2.5,97.5)
   replace plo = r(r1) if ageaxis==`a'
   replace phi = r(r2) if ageaxis==`a'
   drop pi
   local a = `a' + 1
}
sort ageaxis
graph plo phi ageaxis, s(ii) c(||)



Gary King 2006-01-04