Hi,
I am comparing information from different data sources. The datasets have been merged already and the variable names are different across datasets.
Dataset 1 includes variables "vehicle, burglary, murder ".
Dataset 2 includes variables "motorvehicle ,housebreaking ,homicides ".
I am trying to compare "vehicle" from Dataset1 to "motorvehicle" from Dataset2.
Here is what I did:
local data1 vehicle burglary murder
local data2 motorvehicle housebreaking homicides
compare `"`data1'"' `"`data2'"'
However, I get this error:
vehicle burglary murder invalid name
I actually have dozens of variables which is why I am trying to use locals.
I would really appreciate your help.
Thanks
I am comparing information from different data sources. The datasets have been merged already and the variable names are different across datasets.
Dataset 1 includes variables "vehicle, burglary, murder ".
Dataset 2 includes variables "motorvehicle ,housebreaking ,homicides ".
I am trying to compare "vehicle" from Dataset1 to "motorvehicle" from Dataset2.
Here is what I did:
local data1 vehicle burglary murder
local data2 motorvehicle housebreaking homicides
compare `"`data1'"' `"`data2'"'
However, I get this error:
vehicle burglary murder invalid name
I actually have dozens of variables which is why I am trying to use locals.
I would really appreciate your help.
Thanks
Comment