[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: real vs destring
Hello,
I am trying to recode a variable containing large numbers which are
currently held as strings.
I am wondering why real and destring give different results
"5560001090"
when I run real I get: 5560001024
when I run destring I get: 5560001090
"5560001108"
when I run real I get: 5560001024
when I run destring I get: 5560001108
Does this mean I should use always use destring in my coding instead of
real?
The commands I use are these:
gen new_var = real(old_var)
gen new_var2 = old_var
destring new_var2, replace
Best
Nick
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/