Learn R Programming

AER (version 0.2-2)

Guns: More Guns, Less Crime?

Description

Guns is a balanced panel of data on 50 US states, plus the District of Columbia (for a total of 51 states), by year for 1977--1999.

Usage

data("Guns")

Arguments

source

Online complements to Stock and Watson (2007). http://wps.aw.com/aw_stock_ie_2/0,12040,3332253-,00.html

Details

Each observation is a given state in a given year. There are a total of 51 states times 23 years = 1,173 observations.

References

Ayres, I., and Donohue, J.J. (2003). Shooting Down the More Guns Less Crime Hypothesis. Stanford Law Review, 55, 1193--1312. Stock, J.H. and Watson, M.W. (2007). Introduction to Econometrics, 2nd ed. Boston: Addison Wesley.

See Also

StockWatson2007

Examples

Run this code
## data
data("Guns")

## visualization
library("lattice")
xyplot(log(violent) ~ as.numeric(as.character(year)) | state, data = Guns, type = "l")

## Stock & Watson (2007), Example 10.1
fm1 <- lm(log(violent) ~ law, data = Guns)
coeftest(fm1, vcov = sandwich)

fm2 <- lm(log(violent) ~ law + prisoners + density + income + 
  population + afam + cauc + male, data = Guns)
coeftest(fm2, vcov = sandwich)

fm3 <- lm(log(violent) ~ law + prisoners + density + income + 
  population + afam + cauc + male + state, data = Guns)
printCoefmat(coeftest(fm3, vcov = sandwich)[1:9,])
            
fm4 <- lm(log(violent) ~ law + prisoners + density + income + 
  population + afam + cauc + male + state + year, data = Guns)
printCoefmat(coeftest(fm4, vcov = sandwich)[1:9,])

Run the code above in your browser using DataLab