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"?
Using atcontrasts in margins for a mixed effect modelHi everyone I am currently working on a project (using Stata 15) to analyse changes in kidney funct…
How to draw a correlation forest map with the admetan command?Dear Statalist, I have recently done a meta-analysis of the correlation coefficient, but I encounter…
Unbalanced panel data analysisHi dear all i hope you all fine ...i am undergoing a problem in running analysis on the data ,the de…
GLM or Tobit Regression & Forecast for different distributions (incl. zero inflation)Dear Statalists, I'd very much like to hear your opinion on the following. What I’m trying to do: …
Interactions, Inconsistent resutlsHi all,, I am getting inconsistent results and hope that someone can help me understand the source.…
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