mixed models

The ‘softer kind’ of tutorial on linear mixed effect regression

Posted on

I recently was pointed to this nice and very accessible tutorial on linear mixed effects regression and how to run them in R by Bodo Winter (at UC Merced). If you don’t have much or any background in this type of model, I recommend you pair it with a good conceptual introduction to these models like Gelman and Hill 2007 and perhaps some slides from our LSA 2013 tutorial.

There are a few thing I’d like to add to Bodo’s suggestions regarding how to report your results:

  1. be clear how you coded the variables since this does change the interpretation of the coefficients (the betas that are often reported). E.g. say whether you sum- or treatment-coded your factors, whether you centered or standardized continuous predictors etc. As part of this, also be clear about the direction of the coding. For example, state that you “sum-coded gender as female (1) vs. male (-1)”. Alternatively, report your results in a way that clearly states the directionality (e.g., “Gender=male, beta = XXX”).
  2. please also report whether collinearity was an issue. E.g., report the highest fixed effect correlations.

Happy reading.


Updated slides on GLM, GLMM, plyr, etc. available

Posted on

Some of you asked for the slides to the Mixed effect regression class I taught at the 2013 LSA Summer Institute in Ann Arbor, MI. The class covered some Generalized Linear Model, Generalized Linear Mixed Models, extensions beyond the linear model, simulation-based approaches to assessing the validity (or power) of your analysis, data summarization and visualization, and reporting of results. The class included slides from Maureen Gillespie, Dave Kleinschmidt, and Judith Degen (see above link). Dave even came by to Ann Arbor and gave his lecture on the awesome power of plyr (and reshape etc.), which I recommend. You might also just browse through them to get an idea of some new libraries (such as Stargazer for quick and nice looking latex tables). There’s also a small example to work through for time series analysis (for beginners).

Almost all slides were created in knitr and latex (very conveniently integrated into RStudio — I know some purists hate it, but comm’on), so that the code on the slides is the code that generated the output on the slides. Feedback welcome.



Is my analysis problematic? A simulation-based example

Posted on Updated on

This post is in reply to a recent question on in ling-R-lang by Meredith Tamminga. Meredith was wondering whether an analysis she had in mind for her project was circular, causing the pattern of results predicted by the hypothesis that she was interested in testing. I felt her question (described below in more detail) was an interesting example that might best be answered with some simulations. Reasoning through an analysis can, of course, help a lot in understanding (or better, as in Meredith’s case, anticipating) problems with the interpretation of the results. Not all too infrequently, however, I find that intuition fails or isn’t sufficiently conclusive. In those cases, simulations can be a powerful tool in understanding your analysis. So, I decided to give it a go and use this as an example of how one might approach this type of question.

Results of 16 simulated priming experiments with a robust priming effect (see title for the true relative frequency of each variant in the population).
Figure 1: Results of 16 simulated priming experiments with a robust priming effect (see title for the true relative frequency of each variant in the population). For explanation see text below.

Read the rest of this entry »

Script for obtaining error intervals from lmer

Posted on

I thought this was worth reposting from ling-R-lang: Sven Hohenstein from the University of Potsdam prepared this script to obtain CIs for, e.g., bar charts from lmer() output. I haven’t tried it yet, but it looks like it will be useful.

Effects of phonological overlap on fluency, speech rate, and word order in unscripted sentence production

Posted on Updated on

The last two papers based on Katrina Furth’s and Caitie Hilliard’s work back when they were at Rochester just came out in the Journal of Experimental Psychology: Learning, Memory, and Cognition and the journal Frontiers in Psychology.

The JEP:LMC paper investigates how lemma selection (i.e., word choice) is affected by phonological overlap. We find evidence for a (weak) bias against sequences of phonologically onset overlapping words. That is, when speakers have a choice, they seem to prefer sentences like “Hannah gave the hammer to the boy”, rather than “Hannah handed the hammer to the boy”. This suggests very early effects of phonology on lexical production, which seem to be incompatible with strictly serial models of word production.

Jaeger, T. F., Furth, K., and Hilliard, C. 2012. Phonological overlap affects lexical selection during sentence production. Journal of Experimental Psychology: Learning, Memory, and Cognition, 38(5), 1439-1449. [doi: 10.1037/a0027862]

The Frontiers paper investigates Read the rest of this entry »

New R library for multilevel modeling

Posted on

This might be of interest to many of you. MLwiN, a software package for multilevel modeling developed at Bristol that includes functions beyond those present in, e.g., lmer, now has an interface for R (kinda like WinBugs, etc.), so that you can continue to use R while taking advantage of the powerful tools in MLwiN. The package is called R2MLwiN. For more details, see below.

Dear all,
We are pleased to announce a new R package, R2MLwiN (Zhang et al. 2012)
that allows R users access to the functionality within MLwiN directly from
within the R package. This package has been developed as part of the e-STAT
ESRC digital social research programme grant along with the Stat-JR package.
See <http://www.bristol.ac.uk/cmm/software/r2mlwin/> for more details
including examples taken from the book MCMC Estimation in MLwiN.

Feedback gratefully received by either me or Zhengzheng Zhang (Z.Zhang@bristol.ac.uk).

Best wishes,
  Bill Browne. 

The serial founder hypothesis and word order universals

Posted on Updated on

Check out this article in ScienceNews summarizing commentaries on two recent language studies in Science (Atkinson, 2011: ) and Nature (Dunn et al., 2011). Each of the studies has received a lot of attention and they are the subject of two special issues in press for Linguistic Typology, to which HLP Lab contributed on three articles. I will add a link to the special issue(s) once it comes out. Read the rest of this entry »