BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I need to use SAS/Graph to draw Clark Error Grid. Does any body know i it is possible? If so , how? Thanks.


SASDR
23 REPLIES 23
DanH_sas
SAS Super FREQ
The best approach for creating this graph would probably be to create an annotate dataset for the regions and region labels. Then, use that annotate dataset with PROC GPLOT to draw the scatterplot with the regions.
deleted_user
Not applicable
Thank you, Dan. It works great.

One more question, how to remove the most outside frame? Thanks.
deleted_user
Not applicable
Thanks, Chris,

I tried noframe option in plot statement in Proc gplot. The frame connected to x-axis and y-axis disappeared but the outmost frame is still there.
deleted_user
Not applicable
Thanks, Scott.

It works great.

Jack
AnalytX
Fluorite | Level 6

Hi everybody,

Would it be possible to have an example of code to draw these Clark Error Grid plots?

Thanking you in advance.

GraphGuy
Meteorite | Level 14

I've taken a stab at this, basing my grid visually on the example in Wikipedia.

Mine looks very similar to theirs, but I wasn't sure what the *exact* cut-off values should be.

If someone knows the exact values, I'd be happy to have them update my sample Smiley Happy


clarke_error_grid.png
GraphGuy
Meteorite | Level 14

And, after seeing how they specified the coordinates for the areas of the 2nd example, I think it probably makes more sense to specify the coordinates of the areas in direct values (rather than %), so I've re-written the first example to use direct values (like the 2nd example).  Attaching the new code:

AnalytX
Fluorite | Level 6

Hi Robert,

Thanks a lor for your quick answer. It souds great!!!

Just a last question: would it be possible to fill with figures and borders with colors (see example in this article - Figure 1)? If yes, It would be perfect!

Thanking you in advance

GraphGuy
Meteorite | Level 14

This could be done with annotated polygons (rather than annotated lines).  Also the areas and axis values are different (actually simpler) in this chart, than in the one I used (from Wikipedia).  And this brings to mind a suggestion for everyone ... if you have a certain chart in mind, please post that in your first comment - this can save a lot of confusion & re-work!

AnalytX
Fluorite | Level 6

Dear Robert,

Thanks for your answer. I will try to do this with annotated polygons. I will let you informed if I succeed to perfom this.

I agree, we have to be very clear about the result we want to obtain.

In my case, please be sure that your code is highly appreciated and helpful as I will have to generate both plots (with 3 and 5 different areas) and also with colors at the request of my colleagues.

Thanking you again for your help.

Best regards

GraphGuy
Meteorite | Level 14

Ok - here's what I've come up with for the other plot (using annotated poly/polycont areas for the colored background)...


hemoglobin_error_grid.png
AnalytX
Fluorite | Level 6

Thanks a lot Robert! That is perfect! This is exactly what we wanted to generate.

Thanks again a lot for your help.

Best regards,

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 23 replies
  • 2839 views
  • 4 likes
  • 10 in conversation