Hi, could any one help me with the following two issues?
First, my id variable values start with 001, 002,... 011, 012, ... 099... and they are all coded as "string".
I thought I should convert them into "numeric" (please say no if this is not what I am supposed to do) and once I converted them, all zeros are gone.
How can I keep those zeros even when I convert them as numeric and is it really necessary or desirable to keep those zeros (since they are original id, so I think I should keep them)?
And second question is:
If some of group id variables start with alphabet (e.g. this household belongs to G35) as "string" variables, then can I just keep them as string or should I convert them something else that should work in Stata?
Sorry for bombarding many questions.
Thanks.
Related Posts with How to convert string id variable starting with "00" to numeric without losing the "00"?
Ho, ho, ho! Wild bootstrap tests for everyone!I've translated the guts of my boottest program from Mata to Julia, producing the Julia package Wild…
How to calculate Sigma (standard deviation of weekly stock return)Hello all Statalist members. I would like to calculate SIGMA (denotes standard deviation of weekly s…
Categorical Variables Hi, I'm an ultra-beginner to Stata and everything related to it. Nevertheless, I have to fix this …
Generate a new variable based on the values of a second variableHi, I'm trying to generate a continuous variable using a comparative dataset where I want the count…
entropy balancing commandsDear all, I hope you are well. I am performing entropy balancing method for PSM. I have read the pa…
Subscribe to:
Post Comments (Atom)
0 Response to How to convert string id variable starting with "00" to numeric without losing the "00"?
Post a Comment