Blog Archives

Example 8.9: Contrasts

October 12, 2010
By
Example 8.9: Contrasts

In example 8.6 we showed how to change the reference category. This is the natural first thought analysts have when their primary comparisons aren't represented in the default output. But our interest might center on a number of comparisons which don...

Read more »

Example 8.8: more Hosmer and Lemeshow

October 5, 2010
By
Example 8.8: more Hosmer and Lemeshow

This is a special R-only entry.In Example 8.7, we showed the Hosmer and Lemeshow goodness-of-fit test. Today we demonstrate more advanced computational approaches for the test.If you write a function for your own use, it hardly matters what it looks l...

Read more »

Example 8.7: Hosmer and Lemeshow goodness-of-fit

September 28, 2010
By
Example 8.7: Hosmer and Lemeshow goodness-of-fit

The Hosmer and Lemeshow goodness of fit (GOF) test is a way to assess whether there is evidence for lack of fit in a logistic regression model. Simply put, the test compares the expected and observed number of events in bins defined by the predicted p...

Read more »

Example 8.6: Changing the reference category for categorical variables

September 21, 2010
By
Example 8.6: Changing the reference category for categorical variables

How can we change the reference category for a categorical variable? This question comes up often in a consulting practice.When including categorical covariates in regression models, there is a question of how to incorporate the categories. One simpl...

Read more »

Example 8.5: bubble plots part 3

September 14, 2010
By
Example 8.5: bubble plots part 3

An anonymous commenter expressed a desire to see how one might use SAS to draw a bubble plot with bubbles in three colors, corresponding to a fourth variable in the data set. (x, y, z for bubble size, and the category variable.) In a previous entries...

Read more »

Example 8.4: Including subsetting conditions in output

September 7, 2010
By
Example 8.4: Including subsetting conditions in output

A number of analyses perform operations on subsets. Making it clear what observations have been excluded or included is helpful to include in the output.SASThe where statement (section A.6.3) is a powerful and useful tool for subsetting on the fly. (...

Read more »

Summer hiatus

August 2, 2010
By
Summer hiatus

We're taking a break from posting for most of August. We'll be back in a month with new examples, including R- and SAS-applicable tricks and tools.Please drop us any ideas in the comments or by e-mail. We love feedback of any kind.

Read more »

Example 8.2: Digits of Pi, redux

July 12, 2010
By
Example 8.2: Digits of Pi, redux

In example 8.1, we considered some simple tests for the randomness of the digits of Pi. Here we develop a different test and implement it. If each digit appears in each place with equal and independent probability, then the places between recurrences...

Read more »

Example 8.1: Digits of Pi

July 6, 2010
By
Example 8.1: Digits of Pi

Do the digits of Pi appear in a random order? If so, the trillions of digits of Pi calculated can serve as a useful random number generator. This post was inspired by this entry on Matt Asher's blog. Generating pseudo-random numbers is a key piece o...

Read more »

Example 7.42: Testing the proportionality assumption

June 21, 2010
By
Example 7.42: Testing the proportionality assumption

In addition to the non-parametric tools discussed in recent entries, it's common to use proportional hazards regression, (section 4.3.1) also called Cox regression, in evaluating survival data.It's important in such models to test the proportionality a...

Read more »