/* Replication Program: Green, Strolovitch, and Wong (in press) "Defended Neighborhoods, Integration, and Racially Motivated Crime" American Journal of Sociology Poisson & Negative binomial regression analyses (*note that program on some operating systems will need to be run twice: comment out everything after the first call of negbin; run; then run the entire program) (**note that model III's standard errors are estimated separately by bootstrap) */ @-----------------------------------------------@ @ Read in GAUSS Count Module and Gauss dataset @ @-----------------------------------------------@ library count; #include count.ext; countset; open f1 = "temp"; x = readr(f1,rowsf(f1)); makevars(x,0,getname("temp")); f1 = close(f1); _max_GradTol=.0000001; print " @-----------------------------------------------@ @ Replicate Table 10: Columns II - VII @ @ Anti-Black Incidents @ @ with white or unknown offenders @ @ CONTROL ADDED FOR LOG OF POPULATION, 1990 @ @-----------------------------------------------@"; print " Column II "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,nhwu90,lntot90 }; _cnstart=2; @ poisson regression provides start values for negative binomial regression @ screen off; { b,vc,llik } = poisson("temp",dep1,ind1); call countprt(b,vc,llik); _cnsval=b|-2; @ negative binomial regression @ { b,vc,llik } = negbin("temp",dep1,ind1,0); screen on; call countprt(b,vc,llik); print " Gauss likelihood minus sumc(lnfact(y)) " (llik - sumc(lnfact(newbhc))); print " Column III "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,nhwu90,xnhwub,lntot90 }; _cnstart=2; @ poisson regression provides start values for negative binomial regression @ screen off; { b,vc,llik } = poisson("temp",dep1,ind1); call countprt(b,vc,llik); _cnsval=b|-2; @ negative binomial regression @ { b,vc,llik } = negbin("temp",dep1,ind1,0); screen on; call countprt(b,vc,llik); hh=_max_FinalHess; print " Gauss likelihood minus sumc(lnfact(y)) " (llik - sumc(lnfact(newbhc))); print " Column IV "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,xnhwub,lntot90 }; _cnstart=2; @ poisson regression provides start values for negative binomial regression @ screen off; { b,vc,llik } = poisson("temp",dep1,ind1); call countprt(b,vc,llik); _cnsval=b|-2; @ negative binomial regression @ { b,vc,llik } = negbin("temp",dep1,ind1,0); screen on; call countprt(b,vc,llik); print " Gauss likelihood minus sumc(lnfact(y)) " (llik - sumc(lnfact(newbhc))); print " Column V "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,dnhwu,lntot90 }; _cnstart=2; @ poisson regression provides start values for negative binomial regression @ screen off; { b,vc,llik } = poisson("temp",dep1,ind1); call countprt(b,vc,llik); _cnsval=b|-2; @ negative binomial regression @ { b,vc,llik } = negbin("temp",dep1,ind1,0); screen on; call countprt(b,vc,llik); print " Gauss likelihood minus sumc(lnfact(y)) " (llik - sumc(lnfact(newbhc))); @_max_GradTol=.0001;@ print " Column VI "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,dnhwu,xdnhub,lntot90 }; _cnstart=2; @ poisson regression provides start values for negative binomial regression @ screen off; { b,vc,llik } = poisson("temp",dep1,ind1); call countprt(b,vc,llik); _cnsval=b|-2; @ negative binomial regression @ { b,vc,llik } = negbin("temp",dep1,ind1,0); screen on; call countprt(b,vc,llik); print " Gauss likelihood minus sumc(lnfact(y)) " (llik - sumc(lnfact(newbhc))); print " Column VII "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,xdnhub,lntot90 }; _cnstart=2; @ poisson regression provides start values for negative binomial regression @ screen off; { b,vc,llik } = poisson("temp",dep1,ind1); call countprt(b,vc,llik); _cnsval=b|-2; @ negative binomial regression @ { b,vc,llik } = negbin("temp",dep1,ind1,0); screen on; call countprt(b,vc,llik); print " Gauss likelihood minus sumc(lnfact(y)) " (llik - sumc(lnfact(newbhc)));