The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs![Two-dimensional convex hulls in SAS](https://blogs.sas.com/content/iml/files/2021/11/cvexhull01-640x336.png)
Given a cloud of points in the plane, it can be useful to identify the convex hull of the points. The convex hull is the smallest convex set that contains the observations. For a finite set of points, it is a convex polygon that has some of the points as
![Create a frequency polygon in SAS](https://blogs.sas.com/content/iml/files/2021/11/FreqPoly1-640x336.png)
I was recently asked how to create a frequency polygon in SAS. A frequency polygon is an alternative to a histogram that shows similar information about the distribution of univariate data. It is the piecewise linear curve formed by connecting the midpoints of the tops of the bins. The graph
![The normal approximation and random samples of the binomial distribution](https://blogs.sas.com/content/iml/files/2021/11/BinomNormal2-640x336.png)
Recall that the binomial distribution is the distribution of the number of successes in a set of independent Bernoulli trials, each having the same probability of success. Most introductory statistics textbooks discuss the approximation of the binomial distribution by the normal distribution. The graph to the right shows that the
![Add reference lines to a bar chart in SAS](https://blogs.sas.com/content/iml/files/2021/11/ReflineVBAR2-640x336.png)
A SAS programmer asked whether it is possible to add reference lines to the categorical axis of a bar chart. The answer is yes. You can use the VBAR statement, but I prefer to use the VBARBASIC (or VBARPARM) statement, which enables you to overlay a wide variety of graphs
![Fit a mixture of Weibull distributions in SAS](https://blogs.sas.com/content/iml/files/2017/01/ProgrammingTips-2.png)
A previous article discusses how to use SAS regression procedures to fit a two-parameter Weibull distribution in SAS. The article shows how to convert the regression output into the more familiar scale and shape parameters for the Weibull probability distribution, which are fit by using PROC UNIVARIATE. Although PROC UNIVARIATE
![Interpret estimates for a Weibull regression model in SAS](https://blogs.sas.com/content/iml/files/2021/10/WeibullReg5-640x336.png)
It can be frustrating when the same probability distribution has two different parameterizations, but such is the life of a statistical programmer. I previously wrote an article about the gamma distribution, which has two common parameterizations: one that uses a scale parameter (β) and another that uses a rate parameter