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.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1065 views
  • 0 likes
  • 2 in conversation