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
Show SD-within statistics from panel data via outreg2 descriptive tableDear Statalist, For my Masters I need to replicate a paper using Stata. I have managed to successfu…
Wilcoxon matched-pair sign-rank test -signrank- with a grouping variable ( by(groupvar) )Hi! I'm conducting a study in which I have 3 controls per case, matched on age, cancer stage and ca…
xtabond2: Hansen testGood day all, I'm running a dynamic panel regression with results shown below. I'm wondering if my …
Cluster multiple dummy variablesHi everyone, In my dataset there is a categorical variable "nationality" that takes on 36 values, d…
How to plot the below graphs after quantile regression?Please could anyone tell how to plots the same graphs after quantile regression? I have tried to plo…
Subscribe to:
Post Comments (Atom)
0 Response to Identifying ICD-codes in 30 different variables
Post a Comment