Take the 2-minute tour ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

Consider an experiment where a square and diamond appear on a screen, one before the other, and participants are required to judge which came first. Manipulating the time interval between the two shapes and averaging responses to obtain the probability that participants respond "Square came first" typically yields s-shaped curves like:

enter image description here

Now, I know that averaging responses to proportions within each of multiple participants is a bad idea, so presumably I'd want to analyze data from such experiments using a generalized mixed effects model with a link function that recognizes the binomial nature of the raw response data. However, I find the logit and probit links dissatisfying because they have a slope+intercept parameterization that confounds properties of the curve that have independent psychometric interest. Specifically, while the slope is indeed a parameter of interest (as it indexes perceptual sensitivity), the intercept is not. More interesting than the intercept is the shift of the curve, usually indexed by the point on the x-axis at which the curve hits p("square first")=.5.

To elaborate, consider an extension of the above related experiment where there are three groups of participants:

  1. A "control" group with no distractions and equal proportions of "square-first" and "diamond-first" trials
  2. A "distracted" group listening to distracting music
  3. A "biased" group who experience more "square-first" trials than "diamond-first" trials

Presumably, the control group and distraction group should differ in terms of their slope, evaluated via:

#fit a model that contains no group-by-slope interaction
m1 = lmer(
    response ~ (1|participant) + interval + group
    , family = binomial
    , REML = FALSE
#fit a model that contains the groups-by-slope interaction
m2 = lmer(
    response ~ (1|participant) + interval*group
    , family = binomial
    , REML = FALSE
(AIC(m1)-AIC(m2)) #AIC-corrected log-base-e likelihood ratio

Furthermore, presumably the biased group will differ from the other groups on the shift of the function. If I am willing to assume that the groups don't differ in terms of slope, then the shift can be assessed in a manner similar to above by evaluating a group effect on the intercept:

#fit a model with no group effect on the intercept
m3 = lmer(
    response ~ (1|participant) + 1
    , family = binomial
    , REML = FALSE
#fit a model with a group effect on the intercept
m4 = lmer(
    response ~ (1|participant) + group
    , family = binomial
    , REML = FALSE
(AIC(m1)-AIC(m2)) #AIC-corrected log-base-e likelihood ratio

However, this approach to evaluating effects on shift breaks down if you cannot assume that slopes are not also affected by your predictor variable. Sure you can evaluate the assumption of no-effect-on-slopes as described above, but this not only leaves you in the lurch when you do find an effect on slopes, it is susceptible to the same criticisms of other approaches to assumption tests. Finally, even with the assumption of equal slopes, presumably this is an assumption that the slopes are equal on average; variability in the slopes will cause analysis-of-intercepts-as-a-proxy-for-shift to have lower power relative to a direct analysis of shifts (because the variance of the intercepts will represent the combined variance of the slopes and shifts).

So, my questions are:

  1. Is there a link function that handles binomial data while also implementing the slope+shift parameterization?
  2. Failing a "yes" answer to #1, any suggestions on how might I go about coding such a link function? I know how to code an MLE search given a single participant's response data across intervals in a single experimental condition, but I'm not sure how to scale this up to a link function that could be used to analyze data across groups of individuals and conditions.

P.S. I am aware that, given a set of maximum likelihood estimates for the slope and intercept parameter values, it is simply a matter of arithmetic to compute the ML estimate for the shift value. However, this does not pertain as it cannot be applied to the inferential procedures described above.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Your problem is not really the link function, but rather the parametrization of the linear predictor. Instead of having $\alpha + \beta x$, you would like to have $\beta (x - \delta)$. Here $\delta$ would be the "shift" parameter that you are interested in. While the two are mathematically equivalent ($\alpha = -\beta \delta$), they are not statistically equivalent. In fact, the second parametrization is not linear in its parameters, so it cannot be fitted with a linear model (generalized or not).

This also suggests the solution: you have to use a generalized non-linear mixed model. In R, the nlmer function of the lme4 package can be used. It is a bit more work to set up then the linear model, but should be doable.

share|improve this answer

For simple designs one solution might be to centre based on the psu of one condition. You could do an initial model of one condition, get the pss, recentre all of the data on that, and now your intercept will reflect changes in pss.

You'll still be stuck with a magnitude issue when there are interactions... but some issue somewhere is unavoidable.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.