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
Connecting Labels from X AxisHello, I keep getting an error with the code below, although I have used a similar code in the past…
graph twoway rcap is misbehaving: a random space appears between ytitle and yaxisHello everyone, I wanted to produce same-size/same-format figures but for some reason, a random spa…
Identifying integersHi, My dataset contains a variable called "Ratio". Values therein range from 0 to about 500. Some v…
Removing middle character from a set of variablesHi everyone, This might have a simple solution but I'm stuck. I have a set of variables that goes …
how to run a 3 level multilevel ?I wish to implement under stata a three-level multilevel model to find the determinants of school pe…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping excess character - String variable
Post a Comment