CPANEL Procedure
Example 11.4 Crime Rates in North Carolina: Instrumental Variables Regression
Cornwell and Trumbull (1994) examined data on crime rates from 90 counties in North Carolina and collected data each year from 1981 to 1987. The following statements create the Crime data table. These statements assume that your libref is named mylib, but you can substitute any appropriately defined libref.
data mylib.Crime;
input county year west central urban d82 d83 d84 d85 d86 d87
lcrmrte lprbarr lprbconv lprbpris lavgsen lpolpc
ldensity ltaxpc lwcon lwtuc lwtrd lwfir lwser lwmfg
lwfed lwsta lwloc lmix lpctymle lpctmin;
label county = 'county identifier'
year = '81 to 87'
west = '1 if in western N.C.'
central = '1 if in central N.C.'
urban = '1 if in SMSA'
... more lines ...
The variables are too numerous to describe individually, but they are fully labeled in the regression output and are summarized as follows:
The panel ID variables are
CountyandYear.The dependent variable,
LCrmRte, is the log of the crime rate (number of crimes divided by total population).The variables
West,Central, andUrbanprovide geographical background for each county.The variables
D82throughD87are dummy variables for year effects.The variables with the
LPrbprefix are log-probabilities of police or legal actions. For example,LPrbArris the log-probability of an arrest given that a crime was committed.The variables with the
LWprefix are log weekly wages for various occupations and industries.Other variables that begin with the letter
Lare log-transformed. For example, the variableLPolPCis the log of police per capita.
Cornwell and Trumbull (1994) fit a fixed-effects model for the log of crime rate, with the log-probability of arrest (LPrbArr), and the log of police per capita (LPolPC) among the regressors. They noted that these two regressors were endogenous because of the following causality loops:
Although police presence might decrease the crime rate because of deterrence (or increase the crime rate because of better reporting), an increase in crime might cause a desire for more police presence.
Although the crime rate might fall if more crimes resulted in arrest, a rising crime rate could cause the probability of arrest to decrease because police resources would be spread thin.
To deal with the endogeneity, Cornwell and Trumbull (1994) fit a two-stage least squares (2SLS) model with county-level fixed effects, with two external instruments: LTaxPC (log tax revenue per capita) and LMix (log ratio of crimes that involve face-to-face contact). Their rationale for using these instruments is that counties with higher tax revenues have more police presence and that face-to-face crimes have a higher probability of arrest because victims could identify their offenders.
Baltagi (2006) proposed a similar 2SLS model, but with random effects instead of fixed effects for counties. The following statements recreate that estimation:
proc cpanel data = mylib.crime;
id county year;
model lcrmrte = lprbarr lpolpc lprbconv lprbpris lavgsen ldensity
lwcon lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta
lwloc lpctymle lpctmin west central urban
d82 d83 d84 d85 d86 d87 / ivranone;
endogenous lprbarr lpolpc;
instruments ltaxpc lmix;
run;
The results are shown in Figure 5. The output includes a "Structural Summary" table, which lists the endogenous variables and the instrumental variables. The list of instrumental variables includes both the specified external instruments (variables LTaxPC and LMix) and the exogenous regression variables.
Figure 5: Crime Rates in North Carolina, IV Random Effects
| Model Description | |
|---|---|
| Estimation Method | IVRanOne |
| Variance Estimation | Model Based |
| Data Set | CRIME |
| Number of Observations | 630 |
| Number of Cross Sections | 90 |
| Time Series Length | 7 |
| Fit Statistics | |||
|---|---|---|---|
| SSE | 12.1250 | DFE | 603 |
| MSE | 0.0201 | Root MSE | 0.1418 |
| Variance Component Estimates | ||
|---|---|---|
| Source | Variance | Standard Deviation |
| Cross Sections | 0.046036 | 0.21456 |
| Error | 0.022272 | 0.149239 |
| Hausman Test For Random Effects | |||
|---|---|---|---|
| Coefficients | DF | m Value | Pr > m |
| 22 | 22 | 19.50 | 0.6140 |
| Structural Summary | |
|---|---|
| Endogenous Variables | lprbarr lpolpc |
| Instruments | lprbconv lprbpris lavgsen ldensity lwcon lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta lwloc lpctymle lpctmin west central urban d82 d83 d84 d85 d86 d87 ltaxpc lmix |
| Parameter Estimates | |||||||
|---|---|---|---|---|---|---|---|
| Variable | Type | DF | Estimate | Standard Error | t Value | Pr > |t| | Label |
| Intercept | 1 | -0.9538 | 1.2840 | -0.74 | 0.4579 | Intercept | |
| lprbarr | EN | 1 | -0.41293 | 0.0974 | -4.24 | <.0001 | log probability of arrest |
| lpolpc | EN | 1 | 0.434749 | 0.0897 | 4.85 | <.0001 | log police per capita |
| lprbconv | 1 | -0.32289 | 0.0536 | -6.03 | <.0001 | log probability of conviction | |
| lprbpris | 1 | -0.18632 | 0.0419 | -4.44 | <.0001 | log probability of prison sentence | |
| lavgsen | 1 | -0.01018 | 0.0270 | -0.38 | 0.7066 | log avg. sentence in days | |
| ldensity | 1 | 0.429028 | 0.0548 | 7.82 | <.0001 | log people per sq. mile | |
| lwcon | 1 | -0.00748 | 0.0396 | -0.19 | 0.8503 | log weekly wage, construction | |
| lwtuc | 1 | 0.045445 | 0.0198 | 2.30 | 0.0220 | log wkly wge, trns, util, commun | |
| lwtrd | 1 | -0.00814 | 0.0414 | -0.20 | 0.8441 | log wkly wge, whlesle, retail trade | |
| lwfir | 1 | -0.00364 | 0.0289 | -0.13 | 0.8999 | log wkly wge, fin, ins, real est | |
| lwser | 1 | 0.00561 | 0.0201 | 0.28 | 0.7805 | log wkly wge, service industry | |
| lwmfg | 1 | -0.20414 | 0.0804 | -2.54 | 0.0114 | log wkly wge, manufacturing | |
| lwfed | 1 | -0.16351 | 0.1594 | -1.03 | 0.3056 | log wkly wge, fed employees | |
| lwsta | 1 | -0.05405 | 0.1057 | -0.51 | 0.6092 | log wkly wge, state employees | |
| lwloc | 1 | 0.163052 | 0.1196 | 1.36 | 0.1734 | log wkly wge, local gov emps | |
| lpctymle | 1 | -0.10811 | 0.1397 | -0.77 | 0.4393 | log percent young male | |
| lpctmin | 1 | 0.189037 | 0.0415 | 4.56 | <.0001 | log perc. minority, 1980 | |
| west | 1 | -0.22684 | 0.0996 | -2.28 | 0.0231 | 1 if in western N.C. | |
| central | 1 | -0.19404 | 0.0598 | -3.24 | 0.0012 | 1 if in central N.C. | |
| urban | 1 | -0.22515 | 0.1156 | -1.95 | 0.0520 | 1 if in SMSA | |
| d82 | 1 | 0.010745 | 0.0258 | 0.42 | 0.6772 | 1 if year == 82 | |
| d83 | 1 | -0.08379 | 0.0307 | -2.73 | 0.0065 | 1 if year == 83 | |
| d84 | 1 | -0.1035 | 0.0371 | -2.79 | 0.0054 | 1 if year == 84 | |
| d85 | 1 | -0.0957 | 0.0495 | -1.94 | 0.0534 | 1 if year == 85 | |
| d86 | 1 | -0.0689 | 0.0596 | -1.16 | 0.2481 | 1 if year == 86 | |
| d87 | 1 | -0.03141 | 0.0705 | -0.45 | 0.6562 | 1 if year == 87 | |
| EN: endogenous variable |
Cornwell and Trumbull (1994) favored a fixed-effects approach because a Hausman specification test rejected the null hypothesis of random effects. Baltagi (2006) argued that the Hausman test used by Cornwell and Trumbull (1994) was inaccurate because it was based on standard methodology that did not account for endogeneity in the regressors.
Baltagi (2006) proposed a modified 2SLS Hausman test, and the results of that test are provided in the "Hausman Test For Random Effects" table in the output. The results favor the random-effects specification.
A higher probability of arrest is shown to diminish crime, and police presence increases the crime rate because more crimes are reported.
The following statements fit the model by two-step GMM with robust standard errors:
proc cpanel data = mylib.crime;
id county year;
model lcrmrte = lprbarr lpolpc lprbconv lprbpris lavgsen ldensity
lwcon lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta
lwloc lpctymle lpctmin west central urban
d82 d83 d84 d85 d86 d87 / ivranone gmm = twostep
robust;
endogenous lprbarr lpolpc;
instruments ltaxpc lmix;
run;
The results are shown in Output 11.4.1. The coefficients do not change much, but the standard errors are now more reliable. You can also obtain bias-corrected standard errors by using the BIASCORRECTED option according to the method of Windmeijer (2005).
Output 11.4.1: Crime Rates in North Carolina, IV Random Effects by Two-Step GMM
| Model Description | |
|---|---|
| Estimation Method | IVRanOne |
| Estimation Technique | Two-Step GMM |
| Variance Estimation | Robust |
| Data Set | CRIME |
| Number of Observations | 630 |
| Number of Cross Sections | 90 |
| Time Series Length | 7 |
| Fit Statistics | |||
|---|---|---|---|
| SSE | 12.3814 | DFE | 603 |
| MSE | 0.0205 | Root MSE | 0.1433 |
| Variance Component Estimates | ||
|---|---|---|
| Source | Variance | Standard Deviation |
| Cross Sections | 0.046036 | 0.21456 |
| Error | 0.022272 | 0.149239 |
| Hausman Test For Random Effects | |||
|---|---|---|---|
| Coefficients | DF | m Value | Pr > m |
| 22 | 22 | 15.77 | 0.8271 |
| Structural Summary | |
|---|---|
| Endogenous Variables | lprbarr lpolpc |
| Instruments | lprbconv lprbpris lavgsen ldensity lwcon lwtuc lwtrd lwfir lwser lwmfg lwfed lwsta lwloc lpctymle lpctmin west central urban d82 d83 d84 d85 d86 d87 ltaxpc lmix |
| Parameter Estimates | |||||||
|---|---|---|---|---|---|---|---|
| Variable | Type | DF | Estimate | Standard Error | t Value | Pr > |t| | Label |
| Intercept | 1 | -1.66797 | 1.1204 | -1.49 | 0.1371 | Intercept | |
| lprbarr | EN | 1 | -0.37858 | 0.1137 | -3.33 | 0.0009 | log probability of arrest |
| lpolpc | EN | 1 | 0.426573 | 0.0858 | 4.97 | <.0001 | log police per capita |
| lprbconv | 1 | -0.31245 | 0.0587 | -5.32 | <.0001 | log probability of conviction | |
| lprbpris | 1 | -0.14817 | 0.0458 | -3.23 | 0.0013 | log probability of prison sentence | |
| lavgsen | 1 | 0.030359 | 0.0309 | 0.98 | 0.3255 | log avg. sentence in days | |
| ldensity | 1 | 0.340629 | 0.0585 | 5.83 | <.0001 | log people per sq. mile | |
| lwcon | 1 | -0.02737 | 0.0246 | -1.11 | 0.2658 | log weekly wage, construction | |
| lwtuc | 1 | 0.029904 | 0.0195 | 1.54 | 0.1248 | log wkly wge, trns, util, commun | |
| lwtrd | 1 | 0.003937 | 0.0422 | 0.09 | 0.9258 | log wkly wge, whlesle, retail trade | |
| lwfir | 1 | -0.00248 | 0.0131 | -0.19 | 0.8498 | log wkly wge, fin, ins, real est | |
| lwser | 1 | -0.00434 | 0.0130 | -0.33 | 0.7379 | log wkly wge, service industry | |
| lwmfg | 1 | -0.16174 | 0.0835 | -1.94 | 0.0532 | log wkly wge, manufacturing | |
| lwfed | 1 | -0.00709 | 0.1499 | -0.05 | 0.9623 | log wkly wge, fed employees | |
| lwsta | 1 | -0.02507 | 0.0798 | -0.31 | 0.7535 | log wkly wge, state employees | |
| lwloc | 1 | 0.090092 | 0.1089 | 0.83 | 0.4086 | log wkly wge, local gov emps | |
| lpctymle | 1 | -0.07707 | 0.1143 | -0.67 | 0.5002 | log percent young male | |
| lpctmin | 1 | 0.181526 | 0.0478 | 3.79 | 0.0002 | log perc. minority, 1980 | |
| west | 1 | -0.2151 | 0.1031 | -2.09 | 0.0374 | 1 if in western N.C. | |
| central | 1 | -0.16708 | 0.0537 | -3.11 | 0.0020 | 1 if in central N.C. | |
| urban | 1 | -0.12948 | 0.0816 | -1.59 | 0.1129 | 1 if in SMSA | |
| d82 | 1 | 0.01654 | 0.0242 | 0.68 | 0.4939 | 1 if year == 82 | |
| d83 | 1 | -0.07028 | 0.0313 | -2.25 | 0.0251 | 1 if year == 83 | |
| d84 | 1 | -0.09766 | 0.0339 | -2.88 | 0.0041 | 1 if year == 84 | |
| d85 | 1 | -0.08787 | 0.0462 | -1.90 | 0.0578 | 1 if year == 85 | |
| d86 | 1 | -0.0586 | 0.0508 | -1.15 | 0.2492 | 1 if year == 86 | |
| d87 | 1 | -0.02047 | 0.0580 | -0.35 | 0.7244 | 1 if year == 87 | |
| EN: endogenous variable |