The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Interpolation vs extrapolation: the convex hull of multivariate data](https://blogs.sas.com/content/iml/files/2019/03/convexhull4-640x336.png)
Statisticians often emphasize the dangers of extrapolating from a univariate regression model. A common exercise in introductory statistics is to ask students to compute a model of population growth and predict the population far in the future. The students learn that extrapolating from a model can result in a nonsensical
![The value of pi depends on how you measure distance](https://blogs.sas.com/content/iml/files/2019/03/LpCircles1.png)
It's time to celebrate Pi Day! Every year on March 14th (written 3/14 in the US), math-loving folks celebrate "all things pi-related" because 3.14 is the three-decimal approximation to the mathematical constant, π. Although children learn that pi is approximately 3.14159..., the actual definition of π is the ratio of
![How to detect SAS data sets that contain (or do not contain) character variables](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
A SAS programmer posted an interesting question on a SAS discussion forum. The programmer wanted to iterate over hundreds of SAS data sets, read in all the character variables, and then do some analysis. However, not every data set contains character variables, and SAS complains when you ask it to
![Use PROC BOXPLOT to display hundreds of box plots](https://blogs.sas.com/content/iml/files/2019/03/NCSAT6-700x336.png)
A previous article shows how to use a scatter plot to visualize the average SAT scores for all high schools in North Carolina. The schools are grouped by school districts and ranked according to the median value of the schools in the district. For the school districts that have many
![Visualize SAT scores in North Carolina](https://blogs.sas.com/content/iml/files/2019/03/NCSAT5-600x336.png)
Standardized tests like the SAT and ACT can cause stress for both high school students and their parents, but according to a Wall Street Journal article, the SAT and ACT "provide an invaluable measure of how students are likely to perform in college and beyond." Naturally, students wonder how their
![3 ways to create nested box plots in SAS](https://blogs.sas.com/content/iml/files/2019/02/nestbox4-640x336.png)
Box plots are a great way to compare the distributions of several subpopulations of your data. For example, box plots are often used in clinical studies to visualize the response of patients in various cohorts. This article describes three techniques to visualize responses when the cohorts have a nested or