title: R: analyzing multiple responses (i.e. dependent variables) in a mixed effects model (lme4)
body: <p>I have a, what I thought, really simple question. In a longitudinal experiment with a group of participants has everyone rated everyone else on, let's say, 10 variables (e.g. "This person is likeable.", "This person is dull." and so on) at 7 different times.
  If i want to get some sort of perceiver and target variance for one variable/response I'd use:</p>
  
  <pre><code>lmer(scale(Var1) ~ (1|target) + (1|perceiver), data= subset(x, time_point == 1))
  </code></pre>
  
  <p>Here we have a dependent variable "Var1" of a dataframe "x" with the specification of the 1st time_point (which is also a variable of x).</p>
  
  <p>So far so good, this works just fine.</p>
  
  <p>Now as I said, I have multiple responses and multiple time points. Therefore I wanted to use a) a "for"-loop, or b) lapply, to get all the models at once.</p>
  
  <p>Either way, I have to somehow "index" the dependent variable, be it specifying the column position (<code>x[,10]</code> with 10 being the assumed position of Var1) or the variable itself (<code>x$Var1</code>) or (which is at least a little odd) paste or print the name of the Variable into the formula (<code>col.names(c[10]</code>).</p>
  
  <p>What I am trying to say is, neither of this does work. I always get an error about differing variable lengths. But, as I wrote, I am using the exact same columns!</p>
  
  <p>Does anyone of you have experience with running multiple lmers?</p>
  
  <p>All ideas are welcome and appreciated! I hope I was not too unclear, if you need any further information, I'd be happy to provide, as far as I can.</p>
  
  <p>Cheers,
  Al</p>