Last active
August 7, 2019 17:09
-
-
Save andybega/0e0dcc821dfd183a9bb9429afbbb07a6 to your computer and use it in GitHub Desktop.
Fraction of neighboring US states with a policy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library("splm") | |
data("usaww") | |
?usaww | |
# Only Alabama has this policy | |
policy_x <- c(1, rep(0, 47)) | |
names(policy_x) <- rownames(usaww) | |
head(policy_x) | |
# Fraction of neighboring states with policy x | |
usaww %*% policy_x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment