Dear colleagues,:
I have to work with a database that contains codes that I would like to codify. In order to do that I would like to substituite the certain values inside the variable.
For example:
AD00053
zoC0151
I would like to add at the beginning the characters CL1 and afterwards substitute the letter A for 1 D for 4 and then then the numbers by order per oder numbers. This should be done with a loop, since I need to do it over and over all the observations (+200.000)
Thank you very much for your help
Related Posts with Susbtituting characters or numbers inside a variable
How to write the objective function in optimize command?Hi Statalist, I am trying to minimize the below objective function in Stata using optimize command …
Using 'cgmwildboot' _ Standard errors "Null"Dear all, I need some help with running the 'cgmwildboot' command. I intend to utilize a Control Fun…
Creating super tables of proportions in STATAHi, I have 12 variables labeled treat1 - treat12. All the responses are coded as Y/N. I would like t…
xtgee adjusted R-sqDear All, Hello I'm using xtgee for longitudinal data after I failed to get appropriate results by …
Error using readreplace in Stata17 versionHi All, I'm now using the command: readreplace in Stata 17 version. I got the following error, pleas…
Subscribe to:
Post Comments (Atom)
0 Response to Susbtituting characters or numbers inside a variable
Post a Comment