Dear Statalist,

I have a variable State with storage type str3. I want to creat a dummy variable, 1 when State equals "CT", 0 for else. So I generate a new dummy as below:

gen New_England = 0
replace New_England = 1 if State == "CT"

But 0 real changes made.

I am confused which step is wrong. Forgive me that I may ask a silly easy question.. And thank you for your help!

Best regard
Lijuan