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
Regressions with interaction terms and interacted fixed effectsHi, i've got some questions about how to run a regression with interactions especially how to deal w…
Origin Dest Airline DataMy airline data looks like this: input str3(origin dest) str41 unique_carrier_name int departures_p…
Stop dofile if drop did not make changeDear Statalists, for error-checking in many replace commands, I have found it useful to use the pro…
Fitting Poisson DistributionDear all, I have a variable - number of people who are malnourished in a PSU. I have approximately 2…
Bivariate probit with treatment effectsDear Statalists, I am running my analysis by using a bivariate probit model. I have two dependent va…
Subscribe to:
Post Comments (Atom)
0 Response to encode and destring
Post a Comment