Hello,
I'm cleaning data in preparation for a fuzzy merge/matchit. I will be matching based on police academy names, stored in the variable 'Academy'. In one datafile, the academy name ends with either the full word "academy" or an abbreviated "acad". I'm trying to change "acad" to "academy", but my code is resulting in "academy" also changing to "academyemy". Could someone please take a look at my code below and let me know what the issue is? Thanks very much for your time.
replace Academy = subinstr(Academy, " acad", " academy", .) if strpos((Academy), "academy") != 1
I'm cleaning data in preparation for a fuzzy merge/matchit. I will be matching based on police academy names, stored in the variable 'Academy'. In one datafile, the academy name ends with either the full word "academy" or an abbreviated "acad". I'm trying to change "acad" to "academy", but my code is resulting in "academy" also changing to "academyemy". Could someone please take a look at my code below and let me know what the issue is? Thanks very much for your time.
replace Academy = subinstr(Academy, " acad", " academy", .) if strpos((Academy), "academy") != 1

Comment