-------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  c:\acdbookrevision\stata_final_programs_2013\racd06p0.txt
  log type:  text
 opened on:  22 Jan 2013, 20:11:08

. 
. ********** OVERVIEW OF racd06p0.do **********
. 
. * STATA Program 
. * copyright C 2013 by A. Colin Cameron and Pravin K. Trivedi 
. * used for "Regression Analyis of Count Data" SECOND EDITION
. * by A. Colin Cameron and Pravin K. Trivedi (2013)
. * Cambridge University Press
. 
. * Chapter 6.1 only
. *   6.1 INTRODUCTION: CREATE FIGURE 6.1
. 
. * To run you need files
. *   racd06data1healthcare.dta
. *   racd06data2rectrips.dta
. *   racd06data3fertilityswiss.dta
. *   racd06data4fertilitybritish
. * in your directory
. 
. ********** SETUP **********
. 
. set more off

. version 11.2

. clear all

. * set linesize 82
. set scheme s1mono  /* Graphics scheme */

. 
. ********** DATA DESCRIPTION
. 
. * For the four datasets see 
. *   racd06p1.do, racd06p2.do, racd06p3.do, racd06p4.do 
. * for further details 
. 
. ********** 6.1 INTRODUCTION: CREATE FIGURE 6.1
. 
. use racd06data1healthcare.dta, clear

. label variable OFP "Office Visits to Physicians"

. * The highest 1% are dropped for readability
. histogram OFP if OFP < 30, discrete frequency barwidth(0.8) saving(racd06graph1, replace) xlabel(#6)
(start=0, width=1)
(note: file racd06graph1.gph not found)
(file racd06graph1.gph saved)

. * histogram OFP, discrete frequency barwidth(0.8) saving(racd06graph1, replace) xlabel(#6)
. 
. use racd06data2rectrips, clear

. label variable TRIPS "Recreational Boating Trips"

. * The highest 1% are dropped for readability
. histogram TRIPS if TRIPS < 30, discrete frequency barwidth(0.8) saving(racd06graph2, replace) xlabel(#6)
(start=0, width=1)
(note: file racd06graph2.gph not found)
(file racd06graph2.gph saved)

. 
. use racd06data3fertilityswiss.dta, clear
(Completed fertility data --- Swiss Household Panel W1 [1999])

. label variable children "Completed fertility: Swiss data"

. histogram children, discrete frequency barwidth(0.8) saving(racd06graph3, replace) xlabel(#6)
(start=0, width=1)
(note: file racd06graph3.gph not found)
(file racd06graph3.gph saved)

. 
. use racd06data4fertilitybritish.dta, clear
(Completed fertility Data --- BHPS, updated up to to wave W18)

. label variable children "Completed fertility: British data"

. histogram children, discrete frequency barwidth(0.8) saving(racd06graph4, replace) xlabel(#6)
(start=0, width=1)
(note: file racd06graph4.gph not found)
(file racd06graph4.gph saved)

. 
. *** FIGURE 6.1
. 
. graph combine racd06graph1.gph racd06graph2.gph racd06graph3.gph racd06graph4.gph, ///
>    iscale(0.7) ysize(5) xsize(6) rows(2)

. 
. graph export racd06fig1.eps, replace
(note: file racd06fig1.eps not found)
(file racd06fig1.eps written in EPS format)

. graph export racd06fig1.wmf, replace
(note: file racd06fig1.wmf not found)
(file c:\acdbookrevision\stata_final_programs_2013\racd06fig1.wmf written in Windows Metafile format)

. 
. ********** CLOSE OUTPUT
. 
. * log close
. * exit
. * clear
. 
end of do-file

. exit, clear
