Dear all,
I am trying to dealing with the following problem:
There is a numeric variable in my dataset which is double precision. This numeric variable must be converted to string type for my next work.
I tried to use "tostring" code to convert this numeric variable to string variable. But failed. The "recast" can not change this variable from double precision to float/int /long/byte. Then I used "decode" code to generate a new variable based on this numeric variable. But there is no value of the new variable.
What can I do to deal with this problem? Please help. Thank you all.
Duo Liu
Related Posts with How to change a numeric variable to string variable? Tostring and decode code don't work.
Cross-sectional regressionDear all, I would like to get the residual of cross-sectional regression for every industry-year com…
Parallel trends graph for staggered difference-in-differencesMost papers that use staggered difference-in-differences seem to use regression evidence instead of …
Define a dummy with overlapping periodsDear All, I have this dataset Code: * Example generated by -dataex-. To install: ssc install dataex…
Significant difference between two metric variablesWe have made a pre-test and asked respondents to evaluate the direction and strength of 7 arguments …
Distribution of frequency of a unique variableHi everyone I am relatively new to STATA. I have the following problem I cannot solve: Given my dat…
Subscribe to:
Post Comments (Atom)
0 Response to How to change a numeric variable to string variable? Tostring and decode code don't work.
Post a Comment