BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shixin
Calcite | Level 5

Hi SAS experts,

I am playing around with a dataset that consists of the starting latitude/longitude of a car for 30 consecutive days. I want to know the location of the most frequent starting point (eg. home).

An example of the dataset is below:

date            lat/long          value           

01JAN14     latitude           42.4937362670898

01JAN14     longitude        -83.8847427368164

02JAN14     latitude           42.3681436844645

02JAN14     longitude        -83.8913497924805

03JAN14     latitude           64.1684654354354

03JAN14     longitude        -24.4862442016602

04JAN14     latitude            40.1641654545435

04JAN14     longitude        -83.4861297607422

.....

30JAN14     latitude            39.1641654545435

30JAN14     longitude        -80.4861297607422

I need to get the most frequent lat/long starting point for the 30 days but since the coordinates have up to 13 decimals, I can't just do a proc freq.

I am fairly new to SAS and I was reading up a statistic called PROC UNIVARIATE. I am not familiar with proc univariate so I would like to ask you guys if there's another simpler way for beginners to do it. Otherwise, I will have to read up on that statistic. Thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Figure out a distance boundary, ie 100 m, then translate that to decimal points, say 2. Now round all numbers to 2 decimal places and run a proc freq.

View solution in original post

1 REPLY 1
Reeza
Super User

Figure out a distance boundary, ie 100 m, then translate that to decimal points, say 2. Now round all numbers to 2 decimal places and run a proc freq.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1001 views
  • 0 likes
  • 2 in conversation