First of all, I'm not sure whether my choice of a title and/or tags is appropriate for the questions I have. If they're not, it is also a fair chance that there is already another similar question around, which I haven't found (for the obvious reason). In this case, I'm sorry for the duplicate and willing to be redirected to it.

Following situation. While running repeated measure ANOVA (mixed effects), I decided to run also a regression in order to control for a covariate. This variable is used to approximate time, but is itself discrete (no. of repetition of irrelevant in between relevant events). At this point, I see various options of how to construct the model, which are all reasonable enough from preventing me (with only little experience with regressions) to come to a definite conclusion. What my considerations boil down to, are basically these questions:

  1. How do I handle the fact that interindividual differences is a major predictor in the model, in which I am not interested, though?

    Both excluding the factor "subjects" entirely from the model, and averaging can't be a solution, so my intuitive idea is to run a separate model for each subjects and unify the output together afterwards. However, browsing the web, I read that using nlme and adding subjects as random factors could also be sufficient. Unfortunately, I don't really know how.

  2. Do I use the raw data (with all the repeated measures), or do I aggregate the data first and run the regression on all the means?

    Using the raw data seems to be preferable; however, I wonder whether this is really true and if so, why.

  3. Related to the fact that the regressor is actually discrete, I wonder whether running a regression is still a valid option. And if so, whether 5-6 data points would be sufficient to fit a model.

    I don't believe it is a good idea to use a regression in this case, but I don't understand in which way this should be different from other model-fitting papers that I read, which didn't use the term "regression" but did something very similar on a comparable dataset.

Writing this, I realized, that some of my questions are not really related to the title. At any rate, I am very thankful for any advice.



  • $\begingroup$ In what way is your data hierarchical? $\endgroup$ Oct 29, 2015 at 21:05
  • $\begingroup$ Hierarchical in a repeated measures sense. That is, I have multiple subjects, all of which were tested on all conditions. I'm not really interested in each subject's performance, but I can't exclude them either, because interindividual differences explain quite a lot of all variance. Not sure whether "hierarchical" is the best term for that. Since I have effects on different levels I thought it is appropriate enough. $\endgroup$
    – userE
    Oct 30, 2015 at 11:23

1 Answer 1

  1. My recommendation is to retain the significant though uninteresting factors as it's likely that your interesting parameters would be biased without them

  2. Use the raw data without aggregation. Aggregating would almost certainly wash out any interesting variance

  3. When you say 5 or 6 data points, do you really mean 5 or 6 observations? Are you a Bayesian? Then you can fit a model to those 5 or 6 observations and analyze the posterior. A frequentist wouldn't do that though...not for multiple regression.

  • $\begingroup$ 2) I thought so. thanks for the reaffirmation $\endgroup$
    – userE
    Oct 30, 2015 at 11:24
  • $\begingroup$ 3) Well, if I aggregated the data and averaged over subjects, I would end up with literally 2 series of 5 points each. Of course, each of them consists of way more observations. Without the aggregation, I'd still have only 5 ticks on the x-axis, but a lot more samples for each of them. 1) Also for this advice, thank you. Would you mind also specifying how I should treat this factor? Separate models, random factor in nlme, or anything else? Thanks $\endgroup$
    – userE
    Oct 30, 2015 at 11:30
  • $\begingroup$ I don't understand your last question regarding "separate models, random factors." Would you elaborate? $\endgroup$
    – user78229
    Oct 30, 2015 at 12:41
  • $\begingroup$ Sorry. What I mean is that I am looking for a way to include subjects in the model, without actually having to deal with all individual effects. So, running a regression will give me an beta weight for every subject in addition to the weights for differences between conditions. Ideally, I'd like to have only the condition weights, so that I'd end up with only a single regression line for each condition. However, I don't know whether there is a way to do this, without loosing the contribution of subjects. Running separate regressions and average the results might be an option, or not? $\endgroup$
    – userE
    Oct 30, 2015 at 12:58
  • $\begingroup$ I think I understand your question. Some software lends itself more easily to producing "subject" level equations than others. My recommendation is that you build the model at the subject level and aggregate post-hoc. Consider reviewing some of the excellent references out there on HLMs, if you haven't already. E.g., Gelman and Hill's book on Data Analysis Using Regression... or Judith Singer's Applied Longitudinal Analysis. Raudenbush's Hierarchical Linear Models is another one that I'm less familiar with. $\endgroup$
    – user78229
    Oct 30, 2015 at 13:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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