[R-sig-ME] Modelling a variable that is continuous and constant under different conditions

Noam Tal-Perry no@mt@|perry @end|ng |rom gm@||@com
Wed Mar 10 08:57:43 CET 2021

Hey everyone,

Need some assistance in thinking out a model that includes a variable that
is continuous under one condition, but constant under a different

Basically, participants in my task are given a cue, and after some time
(let's call this the foreperiod, FP), a target appears and they need to
respond to it. Under one distribution (random distribution), the foreperiod
varies between trials, say 0.5-1.5 seconds drawn from a
uniform distribution. Under a separate distribution (fixed distribution),
the foreperiod is constant, say 1 s. In both distributions, there are both
valid and invalid trials, and all participants are exposed to all
distributions and validity conditions (i.e. within-subject design).

I intend to measure RT, and usually what I do is to use polynomial (1st and
2nd order) contrasts on FP to describe the relation between FP and RT. Now
that obviously can't work under the fixed distribution, since there is only
a single value to FP.

To solve this issue, I was thinking perhaps to center the FP at the fixed
distribution's value, and then use treatment contrasts for distribution and
validity, with the fixed and valid levels set as the base levels. This way
the intercept will describe the RT at the fixed interval in the valid
condition. I plan to add FP and FP^2, but only as interaction terms with
the 2nd level of distribution (random distribution) since they make no
sense under the base level in this case. Other than that, I'll add validity
(effect of invalid trials in fixed distribution) and its interaction with
FP:Distribution (RT-FP slopes at random distribution in invalid trials).

In short, the model I have in mind looks like this:
RT ~ 1 + (FP + FP^2):Distribution +  Validity + (FP +
FP^2):Distribution:Validity + (1|subject)

Since I never quite did something like this, I wanted to run it by you guys
to make sure I am not overseeing something important or just plain wrong in
my reasoning.

Alternatively, I was also thinking perhaps to have the fixed FP changing
between blocks, such that it is always constant within a block, but has
several levels overall, which can then be modeled using polynomials.
However that would mean the FP polynomials will be fitted with numerous
datapoints at a few time points for the fixed distribution, and with few
datapoints in numerous time points for the random distribution, and I have
no idea whether that could be problematic or cause any bias in results.

Sorry for the long post, thanks in advance for your input!

Noam Tal-Perry
PhD student
Shlomit Yuval-Greenberg's Cognitive Neuroscience Lab
School of Psychological Sciences, Tel-Aviv University

	[[alternative HTML version deleted]]

More information about the R-sig-mixed-models mailing list