Can I include covariate as random effect in glmer? I have a question regarding covariates in a GLMM. My model comprises a condition variable and a covariate. Crucially, my binomially distributed dependent variable can be interpreted only in dependency of the covariate (the data is from a psychophysics study) and I am looking at how the relationship between responses and covariate change with condition. My model looks like this:
glmer(DV ~ covariate*condition + (condition*covariate|subjects), data=data, 
      family="binomial"(link="logit"), control=glmerControl(optimizer="bobyqa"))

My question is: Is there anything speaking against including a covariate as random effect? 
 A: Your title and the final question in the body of your question have opposite senses ("Can I ...?" vs. " Is there anything speaking against ...")  I would agree with @DustinTran that it's fine to incude random effects of continuous predictors (covariates) in mixed models (i.e. variation in slopes across levels of the RE grouping variable, also known as random-slope models).  The only caveats I can think of are:


*

*your experimental design must support the estimation. For example, for the model described above you should have measured responses for multiple values of the covariate for each condition for each subject.  If the covariate didn't vary within subjects (e.g. body mass, for a short-term experiment) across observations, then there's no way to estimate variation in slopes among individuals.

*you should make sure you have enough data for estimation to be practical. If you have one covariate and $n$ conditions, then you'll be doing the equivalent of estimating variation in slope and intercept for each condition -- a $2n \times 2n$ unstructured (i.e., no constraints other than positive (semi)definiteness) variance-covariance matrix for the random effects parameters.

*this is not something you asked, but I sometimes see confused people trying to fit models containing random effects of the form (1|covariate).  This doesn't make sense: while the effect of covariates can vary across levels ((covariate|subject)), the grouping variable (the variable on the right side of the bar) must be categorical, or reasonably interpretable as a categorical variable (e.g. year, for an experiment with observations distributed across years).

A: This should be fine as long as you have reason to believe the covariate has a random effect. In essence, it's part of the parametric assumption of the model.
