/* Replication Program: Green, Strolovitch, and Wong (in press) "Defended Neighborhoods, Integration, and Racially Motivated Crime" American Journal of Sociology Poisson & Negative binomial regression analyses */ @-----------------------------------------------@ @ 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=.000001; print " @-----------------------------------------------@ @ Replicate Table 10: Columns II - V @ @ Anti-Black Incidents @ @ with white or unknown offenders @ @-----------------------------------------------@"; print " Column II "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,nhwu90 }; _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 }; _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 IV "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,dnhwu }; _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=.00001; print " Column V "; dep1 = { newbhc }; ind1 = { pw80,chngblk,xblk,dnhwu,xdnhub }; _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)));