[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Distance matrix
I am attempting to create a dataset consisting of the distance between
two points.. Currently, the dataset is in a wide format consisting of
latitude and longitude in the form xx.xxxxxxxxxx
id x y
a 2 5
b 4 9
c 9 4
I would like to end up with a dataset consisting of the Euclid distance.
I believe the formula is:
distance=arcos( (cos(rlat1)*cos(rlat2)*cos(rlon1-rlon2)) +(sin(rlat1)*sin
I have tried
mds latitude longitude, id(pid)
and returned "too many macros". I do have aroun 43k observations.
Any guidance or assistance would be greatly appreciated.
* For searches and help try: