use "C:\data\03728-0001-data.dta", clear keep if sex==2 * women keep if age > = 40 * completed fertility keep if year==2002|year==1998|year==1994|year==1990|year==1986|year==1982|year==1978|year==1974 ren childs kids drop if kids ==. drop if age ==. drop if sibs ==. drop if educ ==. gen afb = agekdbrn gen city16=(res16>=4)&(res16<=6) gen lowinc16 = (incom16==1)|(incom16==2) gen immig = (born ==2)|(parborn==8) replace race = racecen1 if year == 2002 gen white = race == 1 label var afb "woman's age when 1st child born" label var white "=1 if r's race is white" label var immig "=1 if respondent or both r's parents born abroad" label var lowinc16 "=1 if income is below average income at age 16" label var city16 "=1 if respondent lived in a city (pop>50000) at age 16" keep year sibs kids age afb educ white city16 lowinc16 immig order kids age educ year sibs afb white city16 lowinc16 immig gen trend = year - 1974 * Now to replicated the results of Table 8.7 in the W&B textbook * Poisson Regression Model poisson kids educ trend white immig lowinc16 city16 * As discussed in the W&B textbook, one can get robust standard * errors for the Poisson Regression coeficient estimates by * using the vce(rbust) option. This is what is called * Quasi-Maximum Likelihood Estimation (QMLE) poisson kids educ trend white immig lowinc16 city16, vce(robust) * Negative Binomial Regression I nbreg kids educ trend white immig lowinc16 city16 * Negative Binomial Regression II gnbreg kids educ trend white immig lowinc16 city16 *Now what we would like to do is investigate whether we should *be doing our count model analysis using some adjustment for the *presence of excess zeroes. Here we use the zinb command and its *"Vuong" option to test for the presence of an excess number of zeroes *among the counts. zinb kids educ trend white immig lowinc16 city16, inflate(educ trend white immig lowinc16 city16) vuong * The Vuong statistic is distributed as a N(0,1) random variable. The observed * z statistics is 6.18 with right-tailed p-value of 0.0000. Therefore, we * conclude that we need to model excess zeroes either using a hurdle model or * zero-inflated model (as in the above output). If the Vuong z-statistic had been * significantly negative, we would have concluded that there are not an excess number * of zeroes and we can model the count data with the standard negative binomial model. * If the two-tailed p-value of the Vuong test had been greater than 0.05 the * test would have been inconclusive.