Hello,
I am working with Scatterplots and have been asked to provide some additional information to a colleague.
She wants to know if there is a way to create a table of the point counts in the grid cells. For example:
I've only recently started using SAS and have no idea how to get this done. Appreciate any feedback! Thank you
Are your X and Y variables used in the scatterplot actually continuous or perhaps integer? If the values are integer then likely very easy but if you they are not then you need to provide something that would let use know the boundaries of the values for each cell.
If the values are integer then perhaps:
proc tabulate data=yourdataset; class xvar; class yvar /order=descending; tables yvar, xvar*n=' ' /misstext='0' ; run;
But likely you need to do something to provide us the cell boundaries and something like above but with Custom formats would create the cell boundaries.
Forget SAS for a minute. Before anyone can do SAS, we need to understand the problem.
Describe what a scatterplot of such data would look like — draw it on paper and scan it in; or find such a scatterplot on the Internet and give us the link,
AND explain how you create a scatterplot from such data DO NOT SKIP THIS PART.
Are your X and Y variables used in the scatterplot actually continuous or perhaps integer? If the values are integer then likely very easy but if you they are not then you need to provide something that would let use know the boundaries of the values for each cell.
If the values are integer then perhaps:
proc tabulate data=yourdataset; class xvar; class yvar /order=descending; tables yvar, xvar*n=' ' /misstext='0' ; run;
But likely you need to do something to provide us the cell boundaries and something like above but with Custom formats would create the cell boundaries.
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.
Ready to level-up your skills? Choose your own adventure.