Hi, this is Alice.
I am constantly facing problems of destring a variable that contains both numerical and character context.
Question 1: How can I force the stata to import every variable in string not numeric?
Question 2 When importing variables that contain both numeric and text, I can only use encode. Destring will not work and gen var= real(var) will give me missing values
However, after encoding, the variable value was totally messed up by default.
How can I convert the string variable into numeric by its lab value?
Question 3 would be how can I filter variables by their lab value? as is " keep if var equal to " lable value"
I am sure there is an easy way, but my knowledge is very limited.
Please see attached screen shots for a better interpretation of my questions.
Thank you very much and looking forward your reply
Related Posts with encode and destring
Question about double quotesHi dear all, I want to rename all variabls. ----------------------- copy starting from the next line…
closest relative match based on multiple variables after exact matchingDear Statalisters, I have the following problem: I am trying to match two survey waves (let's call …
expand data at the beginning of the panelHi all, I try to create new missing values in a dataset, in order to obtain the same time period fo…
Moran's I and spatial weights matrixHello everybody, I wish to compute the Moran's I statistic and I'm following the code written by Pi…
if else conditional of number of elements in a localHi, I am trying to set a condition within a nested loop. Now, the loop opens some folders; the cond…
Subscribe to:
Post Comments (Atom)
0 Response to encode and destring
Post a Comment