Posts Tagged ‘ Just for Fun ’

Construct a magic square of any size

August 29, 2012
By
Construct a magic square of any size

Magic squares are cool. Algorithms that create magic squares are even cooler. You probably remember magic squares from your childhood: they are n x n matrices that contain the numbers 1,2,...,n2 and for which the row sum, column sum, and the sum of both diagonals are the same value. There are many
Read more »

Tags: , ,
Posted in SAS | Comments Off

A statistically beautiful Father’s Day

June 18, 2012
By
A statistically beautiful Father’s Day

To celebrate special occasions like Father's Day, I like to relax with a cup of coffee and read the newspaper. When I looked at the weather page, I was astonished by the seeming uniformity of temperatures across the contiguous US. The weather map in my newspaper was almost entirely yellow
Read more »

Tags: , ,
Posted in SAS | Comments Off

Convergence or divergence? A simple iteration with a random component

June 13, 2012
By
Convergence or divergence? A simple iteration with a random component

A collegue who works with time series sent me the following code snippet. He said that the calculation was overflowing and wanted to know if this was a bug in SAS: data A(drop=m); call streaminit(12345); m = 2; x = 0; do i = 1 to 5000; x = m*x
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Spring forward, fall back: Using SAS to compute the onset of daylight saving time

March 8, 2012
By
Spring forward, fall back: Using SAS to compute the onset of daylight saving time

In the United States, this upcoming weekend is when we turn our clocks forward one hour as we adopt daylight saving time. (Some people will also flip their mattresses this weekend!) Daylight saving time (DST) in the US begins on the second Sunday in March and ends on the first
Read more »

Tags: , ,
Posted in SAS | Comments Off

A SAS Christmas tree

December 16, 2011
By

A few colleagues and I were exchanging short snippets of SAS code that create Christmas trees and other holiday items by using the SAS DATA step to arrange ASCII characters. For example, the following DATA step (contributed by Udo Sglavo) creates a Christmas tree with ornaments and lights: data _null_;
Read more »

Tags: , ,
Posted in SAS | Comments Off

Some SAS Samples have long titles, but what is the length of the longest title that has appeared so far?

December 2, 2011
By
Some SAS Samples have long titles, but what is the length of the longest title that has appeared so far?

Recently the "SAS Sample of the Day" was a Knowledge Base article with an impressively long title: Sample 42165: Using a stored process to eliminate duplicate values caused by multiple group memberships when creating a group-based, identity-driven filter in SAS® Information Map Studio "Wow," I thought. "This is the longest
Read more »

Tags: , , ,
Posted in SAS | Comments Off

The distribution of flavors in Halloween candies

November 18, 2011
By
The distribution of flavors in Halloween candies

Halloween night was rainy, so many fewer kids knocked on the door than usual. Consequently, I'm left with a big bucket of undistributed candy. One evening as I treated myself to a mouthful of tooth decay, I chanced to open a package of Wonka® Bottle Caps. The package contained three
Read more »

Tags: , ,
Posted in SAS | Comments Off

The great Christmas gift exchange revisited

November 15, 2011
By
The great Christmas gift exchange revisited

One aspect of blogging that I enjoy is getting feedback from readers. Usually I get statistical or programming questions, but every so often I receive a comment from someone who stumbled across a blog post by way of an internet search. This morning I received the following delightful comment on
Read more »

Tags: , ,
Posted in SAS | Comments Off

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.