Blog Archives

The Statistical Sleuth (second edition) in R

August 15, 2012
By
The Statistical Sleuth (second edition) in R

For those of you who teach, or are interested in seeing an illustrated series of analyses, there is a new compendium of files to help describe how to fit models for the extended case studies in the Second Edition of the Statistical Sleuth: A Course in...

Read more »

Example 9.38: dynamite plots, revisited

July 16, 2012
By
Example 9.38: dynamite plots, revisited

Dynamite plots are a somewhat pejorative term for a graphical display where the height of a bar indicates the mean, and the vertical line on top of it represents the standard deviation (or standard error). These displays are commonly found in many scie...

Read more »

Example 9.37: (Mis)behavior of binomial confidence intervals

July 9, 2012
By
Example 9.37: (Mis)behavior of binomial confidence intervals

While traditional statistics courses teach students to calculate intervals and test for binomial proportions using a normal or t approximation, this method does not always work well. Agresti and Coull ("Approximate is better than "exact' for interval ...

Read more »

Example 9.30: addressing multiple comparisons

May 7, 2012
By
Example 9.30: addressing multiple comparisons

We've been more sensitive to accounting for multiple comparisons recently, in part due to work that Nick and colleagues published on the topic. In this entry, we consider results from a randomized trial (Kypri et al., 2009) to reduce problem drinking ...

Read more »

Example 9.29: the perils of for loops

April 30, 2012
By
Example 9.29: the perils of for loops

A recent exchange on the R-sig-teaching list featured a discussion of how best to teach new students R. The initial post included an exercise to write a function, that given a n, will draw n rows of a triangle made up of "*", noting that for a beginne...

Read more »

Example 9.28: creating datasets from tables

April 23, 2012
By
Example 9.28: creating datasets from tables

RThere are often times when it is useful to create an individual level dataset from aggregated data (such as a table). While this can be done using the expand.table() function within the epitools package, it is also straightforward to do directly with...

Read more »

Example 9.22: shading plots and inequalities

March 1, 2012
By
Example 9.22: shading plots and inequalities

A colleague teaching college algebra wrote in the R-sig-teaching list asking for assistance in plotting the solutions to the inequality x^2 - 3 > 0. This type of display is handy in providing a graphical solution to accompany an analytic one. RThe plot...

Read more »

managing projects using RStudio

February 10, 2012
By
managing projects using RStudio

We're continually amazed with new developments within RStudio, the integrated developed environment for R that we highlighted previously (Among others, Andrew Gelman agrees with us about its value). The most recent addition addresses one of our earlie...

Read more »

Example 9.20: visualizing Simpson’s paradox

February 7, 2012
By
Example 9.20: visualizing Simpson’s paradox

Simpson's paradox is always amazing to explain to students. What's bad for one group, and bad for another group is good for everyone, if you just collapse over the grouping variable. Unlike many mathematical paradoxes, this arises in a number of real...

Read more »

Example 9.17: (much) better pairs plots

December 6, 2011
By
Example 9.17: (much) better pairs plots

Pairs plots (section 5.1.17) are a useful way of displaying the pairwise relations between variables in a dataset. But the default display is unsatisfactory when the variables aren't all continuous. In this entry, we discuss ways to improve these dis...

Read more »


Subscribe

Email:

  Subscribe