BookmarkSubscribeRSS Feed
brophymj
Quartz | Level 8

I have a dataset of a 100 randomly generated xy coordinates. I'm trying isolate the points that are on the edge of the area. The definition of this would be:

if the xy coordinate has no x value from another point above it or

if the xy coordinate has no x value from another point below it or

if the xy coordinate has no y value from another point above it or

if the xy coordinate has no y value from another point above it

I'm looking for a reasonably efficient way of doing this.,


data obs;

   do i= 1 to 100;

      x= round(1000* ranuni(123),1);

      y= round(1000* ranuni(789),1);

      output;

   end;

run;

3 REPLIES 3
ballardw
Super User

I think you may need to provide some graphic examples of what you mean by coordinates that are on the "edge".

Same x but different y, or same y but different x seems to be the implied condition. But why would that make them an "edge"

If you have

(0, 10)

(0,15)

(0,20)

( 5, 10)

( 5, 15)

(5,20)

(10,10)

(15,10)

(25,10)

which are "edge"?

brophymj
Quartz | Level 8

All except (5,15). When I say edge I mean if you drew a line arounf all the outer points such that there were no points outside the shape the points joining the line would be on the edge. Like an efficient frontier.

Rick_SAS
SAS Super FREQ

It sounds like you are looking for the convex hull of the set of planar points. There is a convex hull algorithm in SAS/IML:

SAS/IML(R) 14.1 User's Guide

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 1269 views
  • 0 likes
  • 3 in conversation