I am working with some data where I have measurements for two outputs (Output A and Output B) for 5 participants in an experiment. Each of the 5 participants have both their Output A and Output B quantity measured over 5 timepoints. Here is an example of what the data could look like with accompanying R code:

enter image description here



ids = factor(rep(rep(1:5,each=5),2))
prot = rep(c("Output A","Output B"),each=25)
day = rep(seq(1,10,2),times=10)
value = c(rnorm(25,30,2),rnorm(25,40,6))

X = data.frame(ids,prot,day,value)

ggplot(data=X,aes(day,value,group=ids,color=ids)) + 
  geom_line() + 
  geom_point() + 

Now what I am interested in is determining quantitatively if the measurements for Output A has higher within subject variability than the measurements for Output B. Why this is important is because we would like, going forward, only measure that output that is more "stable" across time for an individual and so we would like to decide which output is more stable across time within subjects. And of course we would like to do this quantitatively rather than qualitatively if possible.

Now, the one big caveat to all of this is that Output A and Output B are not measured in the same units. For sake of argument lets say Output A is measured in liters and Output B is measured in grams. I think this probably greatly complicates the problem.

I was thinking that the approach might be to calculate something like the coefficient of variation since the value is unit less and essentially captures the variability of data relative to the mean, however, does something like this work when trying to only categorize within subject variation (so not total variation or between subject variation).

Any suggestions forward are greatly appreciated!

  • $\begingroup$ Do you suppose that the underlying process is the same for A and B and they have same type and size of serial correlation? $\endgroup$
    – yshilov
    Jan 29, 2018 at 12:46

1 Answer 1


I think that the solution boils down into what you consider to be "stable across time". Is a normal distribution with a mean of 100 and standard deviation of 5 more stable than one with 10 mean and 5 standard deviation? Or would it if the mean for different participants would correspond to the actual order of the means of the underlying distributions?

I would try to calculate the average change in one step, and normalize that with the total standard deviation of the measurements.

$\frac{\sum_\text{p} \sum_{i=1}^{N-1} (x_{p, i}-x_{p, i+1})}{\text{STDEV}(X)}$

where $x_{p, i}$ is the measurement for participant $p$ on day $i$.

I think that the key is to find a right metric to normalize the results with, which should correspond to what kind of stability you are looking for.


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.