Hello All,
I'm working on my first real research project and need some help. I have a big data set for a particular state's emergency room admissions for poisonings, these include drug overdoses which is what I'm interested in. My observational unit is each admission. The data I have on each observational unit is the date, time of day, severity, suspected poisoning agent. My data spans several years. I'm looking at the effectiveness of legal policies meant to curb drug related problems, overdoses being one of them. One key feature I'd like to explore is differences between urban and rural populations. The problem is my data doesn't have any such indicator. I've worked up a data set that uses census data to map zip codes to levels of urbanization. It's simply a list with zip code on the left and population information about that zip code to the right of it. I'd like to add this urbanization data to my big hospital data set. I've tried to merge a few ways, but I don't have any unique identifiers in my hospital data. If you are familiar with excel I'm sort of after a vlookup type function. I'd dump my hospital data into excel and do it with VBA but the hospital data is way to big, plus I know there has to be a way to do it in stata. What I'd like to do is this: For each observation in the hospital data I want stata to take the zip code, look up that zip code in the other data set and then add the corresponding data to the hospital data observation. Am I being clear enough? I am sure it possible, I simply can't figure it out.
Any help is appreciated.
I'm working on my first real research project and need some help. I have a big data set for a particular state's emergency room admissions for poisonings, these include drug overdoses which is what I'm interested in. My observational unit is each admission. The data I have on each observational unit is the date, time of day, severity, suspected poisoning agent. My data spans several years. I'm looking at the effectiveness of legal policies meant to curb drug related problems, overdoses being one of them. One key feature I'd like to explore is differences between urban and rural populations. The problem is my data doesn't have any such indicator. I've worked up a data set that uses census data to map zip codes to levels of urbanization. It's simply a list with zip code on the left and population information about that zip code to the right of it. I'd like to add this urbanization data to my big hospital data set. I've tried to merge a few ways, but I don't have any unique identifiers in my hospital data. If you are familiar with excel I'm sort of after a vlookup type function. I'd dump my hospital data into excel and do it with VBA but the hospital data is way to big, plus I know there has to be a way to do it in stata. What I'd like to do is this: For each observation in the hospital data I want stata to take the zip code, look up that zip code in the other data set and then add the corresponding data to the hospital data observation. Am I being clear enough? I am sure it possible, I simply can't figure it out.
Any help is appreciated.
Comment