BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
StatsGeek
SAS Employee

Hi Matthew,

IML stands for Interactive Matrix Language. As the name implies, it is a matrix language. The beauty of working in a matrix language is that you can work with just the items you want without having to loop through an entire data set. For example, in the code I previously posted I created a vector called deck_shuffled which contained the values for all the cards, shuffled into a random order. If I've already dealt the player cards and want to assign cards for the flop, I can directly grab three values from the vector, put the new values into a vector called flop, and increment the card index:

flop = deck_shuffled[card:card+2];

cards = cards + 3;

This action is rather easy to code after you are accustomed to working with matrices, and it takes virtually no time to run. Remember, this saves us from having to increment through a data set whenever we want to use our data.

IML and the associated syntax is different from data step syntax because you are working with matrices rather than with data sets. However, it is very easy to learn. One of the IML developers, Rick Wicklin, has a great book about learning to program in IML (Statistical Programming with SAS/IML Software) as well as another book on simulating data in IML. He's also published a ton of small papers on using IML for various tasks and writes a SAS blog called The Do Loop. I strongly recommend getting his programming book, as it is very well written. You can find information about his books and other publications here:

SAS Press - Rick Wicklin Author Page

As for evaluating poker hands, I have never written a program for doing so. I notice that Rick suggested in another discussion that you should write a pairwise comparison algorithm to determine whether one hand beats another. That would be my approach as well.

Good luck, and watch out for pocket fives!

Best,

Steve

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 15 replies
  • 4725 views
  • 4 likes
  • 6 in conversation