Hello,
I was wondering if anyone could help me destring certain variable in my dataset. I have a variable with observations that contain underscore "_". For example: "448_12132_01". STATA recognises the variable with these observations as a string variable. However, I need to turn this into numerical variable, so that I can categorise the observations by creating dummy variables.
OR
is there anyway I can create a dummy variable without destringing this certain variable?
* I used: destring X, gen(Y) force
but it just generates blanks
Cheers,
Aslan
Related Posts with destringing
Re-elaboration of string variableHi all, my data look as follows: Code: * Example generated by -dataex-. For more info, type help …
Reshape dataset with format "variable:value"Hello everyone, I have a dataset in the format "variable : value" (see also the following example).…
Johansen Cointegration TestGood evening, I have a question regarding the Johansen cointegration test in Stata. I have two month…
Using IVREG2HPlease can someone help me with the use of the ivreg2h command for analysis? My dependent variable i…
Calculating censorship date for survival analysisI'm doing survival analysis and trying to calculate the end of follow-up date for each patient. Foll…
Subscribe to:
Post Comments (Atom)
0 Response to destringing
Post a Comment