Dear All,
I have a string variable which captures the ICD-10 codes. However, some of the codes have an excess character at the beginning. This character "D" is constant in all cases. I want to drop the extra D from the cases or ICD-10 codes with this issue.
Please find an example of the data below. Thank you
input int ID str7 ICDcode
1 "DF26530"
2 "DD587"
3 "DS2158"
4 "DW1478"
5 "DF26531"
6 "DD588"
7 "DS2159"
8 "DW1479"
9 "DF26532"
10 "DD589"
11 "DS2160"
12 "DW1480"
13 "DF26533"
14 "DD590"
15 "DS2161"
16 "DW1481"
17 "DF26531"
18 "DD588"
19 "DS2159"
20 "DW1479"
21 "DF26532"
22 "DD589"
23 "DS2160"
24 "DW1480"
25 "DF26533"
26 "DD590"
27 "DS2161"
28 "DW1481"
29 "DF26534"
30 "DD591"
Related Posts with Dropping excess character - String variable
Drop all observations with similar variables, except for the earliest?Dear statalists I have struggled with a problem in STATA 16.0 for a couple of days now, and hope th…
Latent Class analyses .Hi to everybody.. I run a latent class model using the command "traj" The better model is the model…
tsline command with maximum observationsDear Stata community, I am running the tsline command for a graph of average male unemployment by c…
Exact Wilcoxon Signed Rank testHello, I hope this is the right place to ask. I am currently using the exact wilcoxon signed rank te…
glm: individual contribution to log-likelihoodDear Statalisters, is there a way to obtain the individual contribution to the log-likelihood when u…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping excess character - String variable
Post a Comment