Stata 11.0 - Type mismatch r(109) byte to strin variable

#1
Hello there,
I just started working with Stata (Version 11.0).
The search in the FAQ and on other pages showed no results so I am trying it here.


I have a variable lit (float %21.0g) with the values "Yes, literate" and "No, illiterate".

My aim is to create a literacy dummy to work with these information in a regression.
My commands are:

gen lit_dummy=0

. replace lit_dummy=1 if lit=="Yes, literate"
type mismatch
r(109);

I searched for r(109) but could not figure out so far how tp solve the problem. It would be great if you could help me.

Kind Regards,
CaptainMcRocket