Hello,
I am currently using a dataset in which income is a string variable with observations formatted like the following : "From $ 15.001 to $ 20.000". This format is basically unusable as it stands, since I will need to do further calculations with the numbers.
Is there any way that I can generate a variable in which every observation is a numeric range? For example, an observation might look like this (or something similar, according to STATA formatting): 15.001 - 20.000
The basic idea is to format the observations in a way in which I would be able to use the ranges to do some calculations (multiplication, regressions, etc). I haven't been able to find any commands that would allow me to do this and I'm not sure if STATA even allows for ranges as observations. Any help would be much appreciated.
I am currently using a dataset in which income is a string variable with observations formatted like the following : "From $ 15.001 to $ 20.000". This format is basically unusable as it stands, since I will need to do further calculations with the numbers.
Is there any way that I can generate a variable in which every observation is a numeric range? For example, an observation might look like this (or something similar, according to STATA formatting): 15.001 - 20.000
The basic idea is to format the observations in a way in which I would be able to use the ranges to do some calculations (multiplication, regressions, etc). I haven't been able to find any commands that would allow me to do this and I'm not sure if STATA even allows for ranges as observations. Any help would be much appreciated.
Comment