This should be a trivial question but somehow I cannot find a clear cut answer.
I am calculating in r the Standard Error (SE) for the mean of the whole group in a repeated measure experiment, what N should I use?
For example in the first group I have 4 subjects measured twice.
subject<-rep(c("red","green", "blue", "yellow"),2)
condition<-c(rep("before",4), rep("after",4))
measure<-c(10,5,7,8,4,3,6,5)
dat<-data.frame(subject,measure, condition)
I calculate the mean of the 8 measurements mean(dat$measure)
(mean=6) but when I calculate the SE shall I divide the Standard Deviation sd(dat$measure)
(sd=2.267787) by the square root of 4 or 8?
And in case I have the second measure only for 3 subjects out of 4 shall I divide the overall standard deviation by the square root of 3, 4 or 7?