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"?
Funnel plots for one arm proportion meta analysisHi, I am performing an one-arm proportion metanalysis of incidence studies. Using this command "me…
how to generate weeks? . tab date_patologi Date of PA | examination | Freq. Percent Cum. ------------+-------------------…
How do you change frequency of dataThe data is currently monthly data. I would like to find the average of the 12 months into a yearly …
Comparing classes in a Latent Profile ModelDear all, I am trying to determine the number of groups or classes for a latent variable using seve…
Generating new variable - Qualtrics exportI am generating a new variable based on existing variables in my dataset which were exported from Qu…
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