The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Reduced regression models and tests for linear hypotheses](https://blogs.sas.com/content/iml/files/2022/10/ReducedModel2-391x336.png)
On a SAS discussion forum, a statistical programmer asked about how to understand the statistics that are displayed when you use the TEST statement in PROC REG (or other SAS regression procedures) to test for linear relationships between regression coefficients. The documentation for the TEST statement in PROC REG explains
![The expected volume of a random tetrahedron in a cube](https://blogs.sas.com/content/iml/files/2022/10/RandTetra1-380x336.png)
One of the benefits of social media is the opportunity to learn new things. Recently, I saw a post on Twitter that intrigued me. The tweet said that the expected volume of a random tetrahedron in the unit cube (in 3-D) is E[Volume] = 0.0138427757.... This number seems surprisingly small!
![Checksums and data integrity in SAS programs](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
Have you ever typed your credit card into an online order form and been told that you entered the wrong number? Perhaps you wondered, "How do they know that the numbers I typed do not make a valid credit card number?" The answer is that credit card numbers and other
![Compute moments of probability distributions in SAS](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
A previous article discusses the definitions of three kinds of moments for a continuous probability distribution: raw moments, central moments, and standardized moments. These are defined in terms of integrals over the support of the distribution. Moments are connected to the familiar shape features of a distribution: the mean, variance,
![Definitions of moments in probability and statistics](https://blogs.sas.com/content/iml/files/2022/09/NCT1-640x336.png)
The moments of a continuous probability distribution are often used to describe the shape of the probability density function (PDF). The first four moments (if they exist) are well known because they correspond to familiar descriptive statistics: The first raw moment is the mean of a distribution. For a random
![Display correlations in a list format](https://blogs.sas.com/content/iml/files/2022/09/CorrPairs2.png)
The correlations between p variables are usually displayed by using a symmetric p x p matrix of correlations. However, sometimes you might prefer to see the correlations listed in "long form" as a three-column table, as shown to the right. In this table, each row shows a pair of variables and the