Dear All,

I have an issue with making STATA to recognize txt observations.

I have a table that looks like the below one and I am required to generate the column Same if the person have similar choice under column mobile and laptop.

PersonID Mobile Laptop Same
4896 Apple Apple 1
5163 Apple Dell 0
I used the following commands:

gen Same=.

. replace Same==1 if( Mobile == Laptop)


But STATA reported the below error:

== invalid name


Any advices? your help will be so appreciated

Regards,

Mohammed Khaled