Hi everyone,
I have a large dataset that was too big for me to use find and replace in Excel for the missing values, so I have many variables that contain double periods .. for missing observations. I want to change these to missing so that I can convert the variables to integers, but I am having trouble changing the string values to missing. Here is my code right now:
foreach var in $varlist {
gen `var'1=subinstr(`var', .., , )
destring `var'1, replace
drop `var'
ren `var'1 `var'
}
I thought this would allow me to substitute a space for the double period, but it isn't working.
Any ideas?
Thanks a lot,
Molly
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
* 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/