Code for Calculating Contiguous Neighbor Events (Adoptions) for the States

Note: This post will only be interesting to a very small subset of people. Hopefully it will be very interesting and helpful for them.

My primary research agenda centers around the broad motivating question of why the states adopt new policy ideas. One of the most oft-tested external influences state policy adoption is whether its contiguous neighbors have adopted the policy previously. Basically, as more of a state’s neighbors adopt something, that state is likewise more likely to adopt. Most often the measure of past adoptions by neighbors is operationalized as either a count or a proportion (proportion probably being the best, given that not every state has the same number of neighbors).

In the course of my research, I have learned first hand what a pain it can be to calculate the count or proportion of a state’s neighbors that previously adopted a policy. At first, I did this by hand with a map (a terrible life decision, so please laugh accordingly, but it worked for the time being). This was no longer practical, however, when I set about to examine the general effects of things like neighbors on the adoption of over 100 different policies for my dissertation. Fortunately, my R skills improved enough that I created a spreadsheet with all neighbor dyads and a little R script that can easily calculate the count and proportion of previous adopters for one policy, or thousands.

Since the word has spread that I study diffusion, and it is currently a hot topic among state politics scholars, I have been asked a number of times how I measure neighbor adoptions. In response, I recently uploaded my script, the neighbor dyad dataset, and two mock adoption datasets to my Harvard Dataverse. This post is to get the word out. So, please, use the code and let me know if you find any errors or have suggestions for making the code better.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s