Alejandra,
a) dont use " ";
*begin example
gen x=.
replace y= 1 if z==0
*end example
b) is this a string variable (no, si, no sabe)? Or with label?
c) See if -recode- can help you.
HTH,
Joao Lima
2008/11/19 <[email protected]>:
> Dear Statlist,
> I need to create a dummy from a double variable (sí, no, no sabe)
> I wrote:
> gen quality = 0
> replace quality = 1 if b8=="no"
>
> And I received the message
>
> type mismatch
> r(109);
>
> What should I do?
>
> Thanks and regards,
> Alejandra Molina
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/
>
--
----------------------------------------
Joao Ricardo Lima, D.Sc.
Professor
UFPB-CCA-DCFS
Fone: +553138923914
Skype: joao_ricardo_lima
----------------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/