The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Colorblind-safe palettes in SAS](https://blogs.sas.com/content/iml/files/2023/01/Coblis4b-702x336.png)
SAS supports the ColorBrewer system of color palettes from the ColorBrewer website (Brewer and Harrower, 2002). The ColorBrewer color ramps are available in SAS by using the PALETTE function in SAS IML software. The PALETTE function supports all ColorBrewer palettes, but some palettes are not interpretable by people with color
![Tips for making colorblind-safe statistical graphs](https://blogs.sas.com/content/iml/files/2023/01/Coblis4b-702x336.png)
Did you know that about 8% of the world's men are colorblind? (More correctly, 8% of men are "color vision deficient," since they see colors, but not all colors.) Because of the "birthday paradox," in a room that contains eight men, the probability is 50% that at least one is
![Write to the log from SAS IML programs](https://blogs.sas.com/content/iml/files/2023/01/PrintToLog1.png)
I previously discussed how to use the PUTLOG statement to write a message from the DATA step to the log in SAS. The PUTLOG statement is commonly used to write notes, warnings, and errors to the log. This article shows how to use the PRINTTOLOG subroutine in SAS IML software
![Use the PUTLOG statement to write errors, warning, and notes to the SAS log](https://blogs.sas.com/content/iml/files/2022/08/search-markus-winkler-unsplash-640x336.jpg)
Many experienced SAS programmers use the PUT statement to write messages to the log from a DATA step. But did you know that SAS supports the PUTLOG function, which is another way to write a message to the log? I use the PUTLOG statement in the DATA step for the
![Visualize how parameters in a binary logistic regression model affect the probability of the event](https://blogs.sas.com/content/iml/files/2023/01/simlogi6-640x336.png)
A previous article shows that you can use the Intercept parameter to control the ratio of events to nonevents in a simulation of data from a logistic regression model. If you decrease the intercept parameter, the probability of the event decreases; if you increase the intercept parameter, the probability of
![Simulate data from a logistic regression model: How the intercept parameter affects the probability of the event](https://blogs.sas.com/content/iml/files/2023/01/simlogi3b-640x336.png)
This article shows that you can use the intercept parameter to control the probability of the event in a simulation study that involves a binary logistic regression model. For simplicity, I will simulate data from a logistic regression model that involves only one explanatory variable, but the main idea applies