[R] Calculating between and within subject coefficient of variation

Alicia Ellis alicia.m.ellis at gmail.com
Wed Mar 29 21:31:36 CEST 2017


Let's say I have repeated measures of some outcome on some subjects.  I
want to be able to calculate the within and between subject coefficient of
variation for this measure.

An example data frame is:

df<-data.frame(ID = c(1,1,1,2,2,2,3,3,3),
               DAY = c(0,3,6, 0,3,6, 0,3,6),
               VALUE = c(1,2,3,4,5,5,2,3,4)
)

Where ID is the identifier of the subject, DAY is the day the measurement
was taken, and VALUE is the measurement taken on that day.


Can someone suggest an efficient way to do this?  I assume I need to start
with repeated measures ANOVA or mixed model but I'm having trouble figuring
out how to use the outputs from those to get the numbers I want.

Thanks!

	[[alternative HTML version deleted]]



More information about the R-help mailing list