The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![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
![Using colors to visualize groups in a bar chart in SAS](https://blogs.sas.com/content/iml/files/2024/02/barColors4-640x336.png)
I sometimes see analysts overuse colors in statistical graphics. My rule of thumb is that you do not need to use color to represent a variable that is already represented in a graph. For example, it is redundant to use a continuous color ramp to represent the lengths of bars