1

I have these two datasets (pictured below) that I need to do a 1-to-1 merge on the state variable. The problem is that in the one dataset the state values are named as abbreviations and the other has the states as numerics with their full name as label values. The goal is to match the appropriate state FIPS code with each state.

What would be the appropriate and easiest way to do this? In my head it's very simple but I don't know what the appropriate syntax is to tell Stata what I want to do. Any help appreciated, thanks.

Dataset 1

enter image description here

  • The translation isn't wired into Stata. You need a dataset with the translation and then `merge` first one-way and then the other way. https://www.stata.com/support/faqs/data-management/group-characteristics-for-subsets/ should help. – Nick Cox Apr 16 '20 at 16:34

1 Answers1

3

search fips shows that a user-written command "statastates" exists that appears to be made for these kinds of things. You can install it by typing ssc install statastates

Wouter
  • 3,201
  • 6
  • 17