Hi
I experienced an error when trying to generate a new variable for distance using geodist.
Here is the command 'geodist -73.147705 -36.824261 -73.146629 -36.838622, gen(d)'
Here is the error message that I see 'lat/lon are not variables, nothing to generate'.
Does anyone know how I can address this?
I am also wondering how we should use the variable in the dta files. For instance, if column D is longitude1, column E is latitude1, and column H is longitude2, column I is latitude2, is there any way we can loop the geodist? e.g. geodist D E H I, gen(d)', which does not work.
I also tried 'gen d= geodist -73.147705 -36.824261 -73.146629 -36.838622' but got the error message 'geodist not found'
Thank you!
I experienced an error when trying to generate a new variable for distance using geodist.
Here is the command 'geodist -73.147705 -36.824261 -73.146629 -36.838622, gen(d)'
Here is the error message that I see 'lat/lon are not variables, nothing to generate'.
Does anyone know how I can address this?
I am also wondering how we should use the variable in the dta files. For instance, if column D is longitude1, column E is latitude1, and column H is longitude2, column I is latitude2, is there any way we can loop the geodist? e.g. geodist D E H I, gen(d)', which does not work.
I also tried 'gen d= geodist -73.147705 -36.824261 -73.146629 -36.838622' but got the error message 'geodist not found'
Thank you!
Comment