# Articles by Dan Mirman

### A little growth curve analysis Q&A

June 8, 2015 |

I had an email exchange with Jeff Malins, who asked several questions about growth curve analysis. I often get questions of this sort and Jeff agreed to let me post excerpts from our (email) conversation. The following has been lightly edited for clarity and to be more concise.Jeff asked:... [Read more...]

### Plotting Factor Analysis Results

April 20, 2015 |

A recent factor analysis project (as discussed previously here, here, and here) gave me an opportunity to experiment with some different ways of visualizing highly multidimensional data sets. Factor analysis results are often presented in tables of factor loadings, which are good when you want the numerical details, but bad ... [Read more...]

### How to learn R: A flow chart

February 23, 2015 |

I often find myself giving people suggestions about how to learn R, so I decided to put together a flow chart. This is geared toward typical psychology or cognitive science researchers planning to do basic data analysis in R. This is how to get started...

### My "Top 5 R Functions"

February 2, 2015 |

In preparation for a R Workgroup meeting, I started thinking about what would be my "Top 5 R Functions". I ruled out the functions for basic mechanics - save, load, mean, etc. - they're obviously critical, but every programming language has them, so th... [Read more...]

### Plotting mixed-effects model results with effects package

August 13, 2014 |

As separate by-subjects and by-items analyses have been replaced by mixed-effects models with crossed random effects of subjects and items, I've often found myself wondering about the best way to plot data. The simple-minded means and SE from trial-lev... [Read more...]

### Flip the script, or, the joys of coord_flip()

April 4, 2014 |

Has this ever happened to you?I hate it when the labels on the x-axis overlap, but this can be hard to avoid. I can stretch the figure out, but then the data become farther apart and the space where I want to put the figure (either in a talk ... [Read more...]

### Guidebook for growth curve analysis

March 3, 2014 |

I don't usually like to use complex statistical methods, but every once in a while I encounter a method that is so useful that I can't avoid using it. Around the time I started doing eye-tracking research (as a post-doc with Jim Magnuson), people were ... [Read more...]

### Three ways to get parameter-specific p-values from lmer

February 11, 2014 |

How to get parameter-specific p-values is one of the most commonly asked questions about multilevel regression. The key issue is that the degrees of freedom are not trivial to compute for multilevel regression. Various detailed discussions can be found on the R-wiki and R-help mailing list post by Doug Bates. ... [Read more...]

### New version of lme4

September 30, 2013 |

If you haven't realized it yet, a new version of lme4 (version 1.0-4) was released recently (Sept. 21). For an end-user like me, there were not many changes, but there were a few:No more using the @ operator. After a very helpful email exchange with Be... [Read more...]

### A function for comparing groups on a set of variables

May 16, 2013 |

I'm often in the position of needing to compare groups of either items or participants on some set of variables. For example, I might want to compare recognition of words that differ on some measure of lexical neighborhood density but are matched on wo... [Read more...]

### Multiple pairwise comparisons for categorical predictors

April 5, 2013 |

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 ... [Read more...]

### R 3.0 released; ggplot2 stat_summary bug fixed!

April 4, 2013 |

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... [Read more...]

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

February 8, 2013 |

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... [Read more...]

### Using R to create visual illusions

January 18, 2013 |

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... [Read more...]

### Two ways that correlation and stepwise regression can give different results

October 8, 2012 |

[Expanding on my recent answer on Cross Validated, aka stats.stackexchange.com] 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 sense to use ... [Read more...]

### More on fixed and random effects: Plotting and interpreting

September 7, 2012 |

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 remember that fixed ... [Read more...]

### Plotting model fits

August 29, 2012 |

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 the data relatively well, without any substantial systematic deviations. ... [Read more...]

### Customizing ggplot graphs

August 7, 2012 |

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... [Read more...]

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

August 6, 2012 |

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 ... [Read more...]