Hi,
I have a dataset containing one variable identifying study participants and 30 variables containing ICD-codes (one per variable, strings). I need to identify every code indicating diabetes and generate a new variable, coded as 1 or 0 to indicate the presence or absence of diabetes. Of course I can write gen diabetes==1 if var1=="xxx" etc and repeat this up to var30. Alas there are quite a lot of different ICD-codes for diabetes so it would take a lot of time. Does anyone know of a faster way?
Best wishes,
David
Related Posts with Identifying ICD-codes in 30 different variables
Measurement invariance MGCFA: correct approach and issue with identification of configural modelDear Statalist members, I have a question about measurement invariance testing for multigroup confi…
Simple Binary Outcome QuestionHello, I am having a problem understanding a simple statement that I need to code in Stata. Define…
Need help with creating first difference operator for regression - econometricsHi There Everyone. I hope you're all well. I had a question, I'm really lost - i need to create a f…
Need Help Appending a Column Using AsdocDear all, I am using Stata 16, on mac and have provided a sample of my dataset using dataex at the …
Vertically truncating Kaplan-Meir survival curve upon reaching specified minimum threshold.I am trying to vertically truncate Kaplan-Meier survival curves when they reach a certain threshold …
Subscribe to:
Post Comments (Atom)
0 Response to Identifying ICD-codes in 30 different variables
Post a Comment