Hello
I am Hatem Ali, STATA user.
I have a 2 large dataset that I am trying to merge
The common variable in these 2 datasets is called: trr-id_code.
However, This variable is a string non-numeric variable
When I try to merge one by one using key variable. STATA doesnt do and say variables are unequal.
when I tried to destring it, I got the following message:
destring trr_id_code, generate(hhh)
trr_id_code contains nonnumeric characters; no generate
1st question: Is there a way I can destring this variable so I can use it for merging?
2nd question: can I use : merge one to one by observation instead?
Looking forward to hear back from you
Related Posts with destring non numeric values
loop questionHi all, I am new on Stata so my knowledge is limited. I have a variable that indicates whether the …
Replacing variables with loopsreplace c_q33_1=.a if c_q29_1 ==.a replace c_q33_2=.a if c_q29_2 ==.a replace c_q33_3=.a if c_q29_3 …
Replacing values using a loopDear Stata users, I would like to execute the following command through a loop: replace q33_1=.a i…
Allocation of 1 or 0 to a variable based on an odds ratio contained in another variable.I have a final dataset that contains the three variables shown in the table below. I need to assign …
generate a conditional variableguys, can you help me to generate a variable named "sandwich household'? sandwich household is a hou…
Subscribe to:
Post Comments (Atom)
0 Response to destring non numeric values
Post a Comment