Hi all,

I'm currently trying to create a dummy variable, inlaborforce, using the below code:

gen inlaborforce = 0
replace inlaborforce = 1 if labforce == "Yes, in the labor force"
replace inlaborforce = . if labforce == "NIU"

I'm seeing similar if not identical syntax in guides / forums, but I'm get a type mismatch error. Tried to destring but both variables are numerical so that didn't work.

Sorry if this is too basic a question. Thanks,