Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72790

Ways to clean ICD9 codes

$
0
0
I'm a newbie, and trying to clean up an ICD9 string variable that has some errant codes. An example is 530.809999999999999 which should be 530.81
I've tried using recode, and this is what I get:

. recode ICD9CODES1 (530.8099999999999 = 530.81)
recode only allows numeric variables

Replace isn't much better:
. replace ICD9CODES1 = "530.81" if ICD9CODES1 = 530.8099999999999
type mismatch
r(109);

I'm not sure if I first need to (or should) change the ICD9 code variable to a double and then try the recode command, or is there a better way?

Viewing all articles
Browse latest Browse all 72790

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>