My project aims to see if sitting for an hour temporarily slows movement in patients with movement disorders.

I have two groups (20 sick patients and 10 healthy patients) who are randomly assigned to either sit or stand for an hour. Their mobility is assessed using a timed 20metre walk. This is assessed at four time intervals: pre-"intervention" (baseline), immediately post-"intervention" (0mins), 5mins and 15mins.

Ultimately I have four groups:

  1. Healthy individuals who stand for an hour (5 people)
  2. Healthy individuals who sit for an hour (5 people)
  3. Sick individuals who stand for an hour (10 people)
  4. Sick individuals who sit for an hour (10 people)

And I have four measurements for every individual in each group:

  1. Pre-"intervention" (sitting or standing) - baseline
  2. Post-"intervention" (sitting or standing) - 0mins
  3. Post-"intervention" (sitting or standing) - 5mins
  4. Post-"intervention" (sitting or standing) - 15mins

Which test(s) would I use to analyse this data?


3 Answers 3


I'd recommend using a linear mixed model to analyze these data. An example like this is discussed in detail in chapter 8 of Landau & Everitt (2004)$^{[1]}$.

I would proceed as follows: Organize your data in the long-format. The dataset would look like this for the first two participants (numbers are made up):

$$ \begin{array}{l|l|l|l|l|l|l} \text{ID} &\text{Time} & \text{Post} & \text{Pre} & \text{Standing} & \text{Healthy} & \text{Group} \\ \hline 1 & 0 & 39.1 & 39.6 & 1 & 1 & 1 \\ 1 & 5 & 72.2 & 39.6 & 1 & 1 & 1 \\ 1 & 15 & 77.6 & 39.6 & 1 & 1 & 1 \\ 2 & 0 & 52.0 & 64.6 & 0 & 1 & 2 \\ 2 & 5 & 55.2 & 64.6 & 0 & 1 & 2 \\ 2 & 15 & 16.4 & 64.6 & 0 & 1 & 2 \\ ... & ... & ... & ... & ... & ... & ... \\ \end{array} $$

ID is a unique identifier for each participant. Time indicates the measuring time point. Post is the measured mobility at the respective Time. Pre is the measured mobility at baseline. Standing is an indicator variable that is 1 if the subject was standing for an hour and 0 if the subject was sitting for an hour. Healthy is an indicator variable that is 1 if the subject was healthy and 0 if it was not. Group indicates to which group the subject belongs (e.g. 1 = healthy and sitting, 2 = healthy and standing, 3 = sick and standing, 4 = sick and sitting).

We can now proceed to fit a linear mixed model. The outcome variable will be the post values. The time and the group variables will be treated as categorical independent variables. It is also possible to model the post-values as continuous, if you suspect that the trajectories can be approximated reasonably well (e.g. with a linear or polynomial function). Nonlinear trajectories could be modelled using splines. The pre measurements will be included as continuous independent variable. I will include a random intercept for each participant. In R using lme4 this would look like this:

mod1 <- lmer(post ~ time + pre + group + (1|ID), data = mydata)

The coefficients for group would tell you whether there is a difference between the groups. A more complex model would be to allow for different trajectories for each group by including an interaction term between time and group:

mod2 <- lmer(post ~ time*group  + pre + (1|ID), data = mydata)

Here are some ideas for further investigations:

  • Inspect the effect of sitting vs. standing and of healthy vs. sick seperately.
  • Allow for different influence of pre-measurements by including an interaction term between group and pre.


[1]: Landau S, Everitt BS (2004): A Handbook of Statistical Analyses using SPSS. Boca Raton: Chapman & Hall/CRC.


We have four groups and four treatments. Let us name the groups as G1(stand for an hour),G2 (sit for an hour) ,G3(stand for an hour) and G4(sit for an hour) where G1 and G2 belong to Healthy subjects and G3 and G4 belong to sick subjects.

We have three treatment groups which refers to post treatment measurements. Also include the measurement at Baseline. For simplicity we shall call them TB, T0, T5 and T15.

Following set of analysis can be attempted for each group:

  • Carry out t-test between TB and T0. This will reveal the effect of treatment (standing or sitting) on mobility. (We expect this to be significantly different)

    • Carry out ANOVA test between T0,T5 and T10. This will reveal the effect of time on mobility.

The next set of analysis could be as follows:

Fix the treatment say TB measurements and compare between the Groups namely between G1,G2,G3 and G4. This will show how the group differ by mobility at selected point of time. This can be done by ANOVA.

You can also have subgroup comparisons like compare between (G1,G2)that is healthy subjects and (G3,G4) that is sick subjects. Here you can use t-test. I hope this will help you to finalize your actual analysis plan.

  • $\begingroup$ You shouldn't use a regular ANOVA for measurements from the same individuals, this violates independence of measurements. Also, I don't think it is wise to advice someone to perform this many individual hypothesis tests without a word of caution on multiple testing issues. $\endgroup$ Commented Aug 8, 2018 at 5:03

I would suggest a growth curve model. This is a variant of the linear mixed model suggested by COOLSerdash, but I think GCM is a more natural way to think about it.

Essentially, you estimate curves over time for each individual, and then you see if the characteristics of the individuals (in your case, treatment type & disease-status) relate to the parameters of the curves.

The one concern might be sample size, which is quite small in your study.

Alder & Scher, 1994 give a basic introduction to growth curve analysis. (Shameful Self-Promotion - I'm one of the authors).

McArdle & Nesselroade, 2003 talk specifically about using group information in the models.


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.