The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Add a second axis to a SAS graph](https://blogs.sas.com/content/iml/files/2024/03/dupAxes3-400x336.png)
Recently, I saw a scatter plot that displayed the ticks, values, and labels for a vertical axis on the right side of a graph. In the SGPLOT procedure in SAS, you can use the Y2AXIS option to move an axis on the right side of a graph. Similarly, you can
![The likelihood ratio test for linear regression in SAS](https://blogs.sas.com/content/iml/files/2024/03/regMLE6-640x336.png)
A recent article describes how to estimate coefficients in a simple linear regression model by using maximum likelihood estimation (MLE). One of the nice properties of an MLE formulation is that you can compare a large model with a nested submodel in a natural way. For example, if you can
![Maximum likelihood estimates for linear regression](https://blogs.sas.com/content/iml/files/2024/03/regMLE4-640x336.png)
A statistical analyst used the GENMOD procedure in SAS to fit a linear regression model. He noticed that the table of parameter estimates has an extra row (labeled "Scale") that is not a regression coefficient. The "scale parameter" is not part of the parameter estimates table produced by PROC REG
![Pizza pi](https://blogs.sas.com/content/iml/files/2024/03/pizzapi5.png)
Happy Pi Day! Every year on March 14th (written 3/14 in the US), people in the mathematical sciences celebrate all things pi-related because 3.14 is the three-decimal approximation to π ≈ 3.14159265358979.... Pi is a mathematical constant defined as the ratio of a circle's circumference (C) to its diameter (D).
![A generalized Number-Word Game](https://blogs.sas.com/content/iml/files/2024/03/numberword8-395x336.png)
I recently wrote about the Number-Word Game, which is an iterative algorithm that generates a sequence of natural numbers by using the lengths of the words for the numbers. In English, the words are "one", "two", "three", and so on. You can play the Number-Word Game in any alphabetic language
![The Number-Word Game](https://blogs.sas.com/content/iml/files/2024/03/numberword4-640x336.png)
Have you heard about the Number-Word Game? This is a simple game that has the following rules: Start with any positive integer. Write down the English word for the integer. Count the number of letters in the word. This gives a new positive integer. Go to (2). Repeat until a