The DO Loop
Statistical programming in SAS with an emphasis on SAS/IML programs
Suppose you measure data weekly. According to the ISO standard, weeks are measured in the range 1-53, where most years have 52 weeks, but occasionally there is a "leap week." (The WEEK function in SAS implements the ISO standard to find the week-of-the-year for any date.) The heat map to

Dating can be a challenge. No, I'm not talking about the process of finding a soulmate. I'm talking about managing days, weeks, months, and years in statistical analyses and reports! One challenge is how to number the weeks of the year. Because there are seven days in a week, 52

I follow several data visualization experts on social media. Sometimes, I see a graph that I struggle to interpret. When that happens, I ask myself whether there is a simpler and more effective way to visualize the data. Recently, I saw an example of using a "horizon plot" to visualize

While researching a topic on effect sizes, I learned about a SAS function that is related to noncentrality parameters. I previously wrote an article about the noncentral t distribution, which is one of several well-known distributions that contains an optional noncentrality parameter. I mentioned that the PDF, CDF, and QUANTILE

A previous article discusses a "Catch-22" paradox for fitting nonlinear regression models: You can't estimate the parameters until you fit the model, but you can't fit the model until you provide an initial guess for the parameters! If your initial guess for the parameters is not good enough, the nonlinear

I have previously written about the moment-ratio diagram as a graphical tool for modeling univariate distributions and also as a tool for examining the distribution of the skewness and kurtosis statistics for distributions. The simple moment-ratio (M-R) diagram from my book (Wicklin, 2013, Simulating Data with SAS, Chapter 16) is