Blog Archives

Create a Koch snowflake with SAS

December 10, 2016
By
Create a Koch snowflake with SAS

I have a fondness for fractals. In previous articles, I've used SAS to create some of my favorite fractals, including a fractal Christmas tree and the "devil's staircase" (Cantor ) function. Because winter is almost here, I think it is time to construct the Koch snowflake fractal in SAS. A […] The post Create a Koch snowflake with SAS appeared first on The DO Loop.

Read more »

Simultaneous confidence intervals for a multivariate mean

December 7, 2016
By
Simultaneous confidence intervals for a multivariate mean

Many SAS procedure compute statistics and also compute confidence intervals for the associated parameters. For example, PROC MEANS can compute the estimate of a univariate mean, and you can use the CLM option to get a confidence interval for the population mean. Many parametric regression procedures (such as PROC GLM) […] The post Simultaneous confidence intervals for a multivariate mean appeared first on The DO Loop.

Read more »

Discover power laws by log-transforming data

December 5, 2016
By
Discover power laws by log-transforming data

A recent issue of Astronomy magazine mentioned Kepler's third law of planetary motion, which states "the square of a planet's orbital period is proportional to the cube of its average distance from the Sun" (Astronomy, Dec 2016, p. 17). The article included a graph (shown at the right) that shows […] The post Discover power laws by log-transforming data appeared first on The DO Loop.

Read more »

Append data to add markers to SAS graphs

November 30, 2016
By
Append data to add markers to SAS graphs

Do you want to create customized SAS graphs by using PROC SGPLOT and the other ODS graphics procedures? An essential skill that you need to learn is how to merge, join, append, and concatenate SAS data sets that come from different sources. The SAS statistical graphics procedures (SG procedures) enable […] The post Append data to add markers to SAS graphs appeared first on The DO Loop.

Read more »

Goodness-of-fit tests: A cautionary tale for large and small samples

November 28, 2016
By
Goodness-of-fit tests: A cautionary tale for large and small samples

In the classic textbook by Johnson and Wichern (Applied Multivariate Statistical Analysis, Third Edition, 1992, p. 164), it says: All measures of goodness-of-fit suffer the same serious drawback. When the sample size is small, only the most aberrant behaviors will be identified as lack of fit. On the other hand, […] The post Goodness-of-fit tests: A cautionary tale for large and small samples appeared first on The DO Loop.

Read more »

Sampling variation in small random samples

November 23, 2016
By
Sampling variation in small random samples

Somewhere in my past I encountered a panel of histograms for small random samples of normal data. I can't remember the source, but it might have been from John Tukey or William Cleveland. The point of the panel was to emphasize that (because of sampling variation) a small random sample […] The post Sampling variation in small random samples appeared first on The DO Loop.

Read more »

Highlight forecast regions in graphs

November 21, 2016
By
Highlight forecast regions in graphs

A SAS customer asked how to use background colors and a dashed line to emphasize the forecast region for a graph that shows a time series model. The task requires the following steps: Use the ATTRPRIORITY=NONE option on the ODS GRAPHICS statement to make sure that the current ODS style […] The post Highlight forecast regions in graphs appeared first on The DO Loop.

Read more »

Need to log-transform a distribution? There’s a SAS function for that!

November 16, 2016
By
Need to log-transform a distribution? There’s a SAS function for that!

At a conference last week, a presenter showed SAS statements that compute the logarithm of a probability density function (PDF). The log-PDF is a a common computation because it occurs when maximizing the log-likelihood function. The presenter computed the expression in SAS by using an expression that looked like y […] The post Need to log-transform a distribution? There's a SAS function for that! appeared first on The DO Loop.

Read more »

Visualize the ages of US presidents

November 14, 2016
By
Visualize the ages of US presidents

Who was the oldest person elected president of the United States? How about the youngest? Who was the oldest when he left office? Let's look at some data. Wikipedia has a page that presents a table of the presidents of the US by age. It lists the dates for which […] The post Visualize the ages of US presidents appeared first on The DO Loop.

Read more »

One informat to rule them all: Read any date into SAS

November 11, 2016
By
One informat to rule them all: Read any date into SAS

If you obtain data from web sites, social media, or other unstandardized data sources, you might not know the form of dates in the data. For example, the US Independence Day might be represented as "04JUL1776", "07/04/1776", "Jul 4, 1776", or "July 4, 1776." Fortunately, the ANYDTDTE informat makes it […] The post One informat to rule them all: Read any date into SAS appeared first on The DO Loop.

Read more »


Subscribe

Email:

  Subscribe