Hi folks,
I wanted to calculate vincenty distances between two types of stations (emission stations and weather stations) and downloaded the vincenty package via ssc install.
I just appended the weather stations (with their own type of ID) to the emission station data. So now I have about 2,5 million observations with id1 (about 750 stations in 15 years, not perfectly balanced panel) and 14,5 million observations with id2 (about 4200 stations in 15 years, not perfectly balanced panel) and variables lat1 and lon1 and lat2/lon2 with latitudes and longitudes (double format, e.g. 51.83759 for latitude and 14.14703 for longitude).
Probably I just do not get right how the package works, as I naively ran:
which gives me the error code:
Now the question is: Is there a problem regarding the format of my variables or just regarding the proper utilization of the code? (maybe both...)
Furthermore: How do I match the station IDs afterwards if I want the 5 weather stations being the closest to the emission stations?
Thanks in advance,
Philipp
I wanted to calculate vincenty distances between two types of stations (emission stations and weather stations) and downloaded the vincenty package via ssc install.
I just appended the weather stations (with their own type of ID) to the emission station data. So now I have about 2,5 million observations with id1 (about 750 stations in 15 years, not perfectly balanced panel) and 14,5 million observations with id2 (about 4200 stations in 15 years, not perfectly balanced panel) and variables lat1 and lon1 and lat2/lon2 with latitudes and longitudes (double format, e.g. 51.83759 for latitude and 14.14703 for longitude).
Probably I just do not get right how the package works, as I naively ran:
Code:
vincenty lat1 lon1 lat2 lon2, vin(vin) replace immed inkm
Code:
'lat1' found where number expected r(7); end of do-file
Furthermore: How do I match the station IDs afterwards if I want the 5 weather stations being the closest to the emission stations?
Thanks in advance,
Philipp