Hi, I am a new user of Stata and would appreciate any help I can get
I have a varible called v719
it is a response to the question "whether respondent works for family member, someone else or is self-employed"
the possible values are for family member, self-employed, for someone else
i want to convert all reponses that are not for family member to 1 and all response for a family member to 0
However when i tried to do this i got an error- (see below)
How do I convert these values into the numeric form?
I am using Stata/MP 17.0
generate employment=0
. replace employment=1 if v719=="self-employed"
type mismatch
r(109);
. replace employment=1 if v719==self-employed
self not found
r(111);
. describe v719
Variable Storage Display Value
name type format label Variable label
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
v719 byte %8.0g V719 respondent works for family, others, self
I have a varible called v719
it is a response to the question "whether respondent works for family member, someone else or is self-employed"
the possible values are for family member, self-employed, for someone else
i want to convert all reponses that are not for family member to 1 and all response for a family member to 0
However when i tried to do this i got an error- (see below)
How do I convert these values into the numeric form?
I am using Stata/MP 17.0
generate employment=0
. replace employment=1 if v719=="self-employed"
type mismatch
r(109);
. replace employment=1 if v719==self-employed
self not found
r(111);
. describe v719
Variable Storage Display Value
name type format label Variable label
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
v719 byte %8.0g V719 respondent works for family, others, self
Comment