Blog Archives

Multiple pairwise comparisons for categorical predictors

April 5, 2013
By

Dale Barr (@datacmdr) recently had a nice blog post about coding categorical predictors, which reminded me to share my thoughts about multiple pairwise comparisons for categorical predictors in growth curve analysis. As Dale pointed out in his post, the R default is to treat the reference level of a factor as a...

R 3.0 released; ggplot2 stat_summary bug fixed!

April 4, 2013
By

The new version of R was released yesterday. As I understand it, the numbering change to 3.0 represents the recognition that R had evolved enough to justify a new number rather than the addition of many new features. There are some important new featur...

Using R to get h5-index for a list of journals

February 8, 2013
By

In my last blog post I wrote about impact factors and h-index for different journals. That got me wondering about what the h5 index is for all of the journals that I read and may want to publish in. I could look them all up individually, but that sound...

Using R to create visual illusions

January 18, 2013
By

This brings together two of my favorite (professional) things: R and visual illusions. Aside from being an extremely impressive application of R, it's a cool way of making it clear that the illusion is, in fact, an illusion. Here's a simple example:lib...

Two ways that correlation and stepwise regression can give different results

October 8, 2012
By

In general, a correlation test is used to test the association between two variables (y and z). However, if there is a third variable (x) that might be related to z or y, it makes...

More on fixed and random effects: Plotting and interpreting

September 7, 2012
By

In a recent post I showed how plotting model fits can help to interpret higher-order polynomial terms. The key comparison there was between a model that did and did not have the higher order fixed effect terms. If you're going to use this strategy, you need to...

Plotting model fits

August 29, 2012
By

We all know that it is important to plot your data and explore the data visually to make sure you understand it. The same is true for your model fits. First, you want to make sure that the model is fitting...

Customizing ggplot graphs

August 7, 2012
By

There are many things I love about the R package ggplot2. For the most part, they fall into two categories:The "grammar of graphics" approach builds a hierarchical relationship between the data and the graphic, which creates a consistent, int...

Crawford-Howell (1998) t-test for case-control comparisons

August 6, 2012
By

Cognitive neuropsychologists (like me) often need to compare a single case to a small control group, but the standard two-sample t-test does not work for this because the case is only one observation. Several different approaches have been proposed and in a new paper just published in Cortex, Crawford and Garthwaite (2012) demonstrate that the Crawford-Howell (1998) t-test...