I am using StataIC 14 and have a fairly large data set (6000 observations) for which I want to include latitude/longitude ('x' and 'y') based upon other geographic identifiers (house number). I have these data coupled in another, smaller dataset in microsoft excel and so am trying to use a formula as opposed to manually going through and inserting 'x' or 'y' such as :
replace x=-43.027524 if house_num==700
replace y=120.045524 if house_num==700
However I consistently get the error:
type mismatch
r(109);
My 'x' and 'y' variables are currently type 'strL' as is my house_num. I have tried to change the string type to 'str10' for x, or 'str3' for house_num but has made no difference.
Any help would be appreciated,
Cheers.
replace x=-43.027524 if house_num==700
replace y=120.045524 if house_num==700
However I consistently get the error:
type mismatch
r(109);
My 'x' and 'y' variables are currently type 'strL' as is my house_num. I have tried to change the string type to 'str10' for x, or 'str3' for house_num but has made no difference.
Any help would be appreciated,
Cheers.
Comment