Blog Archives

Example 9.26: More circular plotting

April 9, 2012
By
Example 9.26: More circular plotting

SAS's Rick Wicklin showed a simple loess smoother for the temperature data we showed here. Then he came back with a better approach that does away with edge effects. Rick's smoothing was calculated and plotted on a cartesian plane. In this entry we'll explore another option or two...

Read more »

Example 9.25: It’s been a mighty warm winter? (Plot on a circular axis)

April 2, 2012
By
Example 9.25: It’s been a mighty warm winter? (Plot on a circular axis)

Updated (see below)People here in the northeast US consider this to have been an unusually warm winter. Was it?The University of Dayton and the US Environmental Protection Agency maintain an archive of daily average temperatures that's reasonably current. In the case of Albany, NY (the most similar of their records to our...

Read more »

Example 9.24: Changing the parameterization for categorical predictors

March 22, 2012
By
Example 9.24: Changing the parameterization for categorical predictors

In our book, we discuss the important question of how to assign different parameterizations to categorical variables when fitting models (section 3.1.3). We show code in R for use in the lm() function, as follows:lm(y ~ x, contrasts=list(x,"contr.trea...

Read more »

Example 9.23: Demonstrating proportional hazards

March 13, 2012
By
Example 9.23: Demonstrating proportional hazards

A colleague recently asked after a slide suitable for explaining proportional hazards. In particular, she was concerned that her audience not focus on the time to event or probability of the event. An initial thought was to display the cumulative haz...

Read more »

Example 9.21: The birthday "problem" re-examined

February 23, 2012
By
Example 9.21: The birthday "problem" re-examined

The so-called birthday paradox or birthday problem is simply the counter-intutitive discovery that the probability of (at least) two people in a group sharing a birthday goes up surprisingly fast as the group size increases. If the group is only 23 peo...

Read more »

RStudio in the cloud, for dummies

February 13, 2012
By
RStudio in the cloud, for dummies

You can have your own cloud computing version of R, complete with RStudio. Why should you? It's cool! Plus, there's a lot more power out there than you can easily get on your own hardware. And, it's R in a web page. Run it from your tablet. Run i...

Read more »

SAS Macro Simplifies SAS and R integration

January 26, 2012
By
SAS Macro Simplifies SAS and R integration

Many of us feel very enthusiastic about R. It's free, it features cutting edge applications, it has a large community of users contributing for mutual benefit, and on and on. There are also many things to like about SAS, including stability, backwards...

Read more »

Example 9.19: Demonstrating the central limit theorem

January 11, 2012
By
Example 9.19: Demonstrating the central limit theorem

A colleague recently asked "why should the average get closer to the mean when we increase the sample size?" We should interpret this question as asking why the standard error of the mean gets smaller as n increases. The central limit theorem shows t...

Read more »

Example 9.18: Constructing the fastest relay team via enumeration

January 5, 2012
By
Example 9.18: Constructing the fastest relay team via enumeration

In competitive swimming, the medley relay is a team event in which four different swimmers each swim one of the four strokes: freestyle, breaststroke, backstroke, and butterfly. In general, every swimmer might be able swim any given stroke. How can w...

Read more »

Example 9.16: Small multiples

November 29, 2011
By
Example 9.16: Small multiples

Small multiples are one of the great ideas of graphics visionary Edward Tufte (e.g., in Envisioning Information). Briefly, the idea is that if many variations on a theme are presented, differences quickly become apparent. Today we offer general guida...

Read more »