0
$\begingroup$

let's assume that I have 3 subjects with each of them producing 5 values. Now, I can calculate the mean, variance, standard deviation, and standard error for each subject. Each subject has its own mean value. However, how can I combine the VAR, SD, and SE, if I want to say what the average variance, average standard deviation and average standard error for an "average" subject is while neglecting that they have all different mean values?

Example:

Subject 1 produces the values {79,75,77,80,74} thus with the mean=77.0, VAR=5.2, SD=2.28, SE=1.02

Subject 2 produces the values {83,79,81,84,84} thus with the mean=82.2, VAR=3.8, SD=1.94, SE=0.87

Subject 3 produces the values {81,76,80,77,79} thus with the mean=78.6, VAR=3.4, SD=1.85, SE=0.83

Thank you for your help!

Edit: What I need is the standard deviation and standard error which can be expected within one random single subject. I certainly do not want to compare the subjects against each other but simply say how data within one subject will usually vary.

I have seen different approaches: I could calculate the SD and SE for every subject separately and then determine the mean values of the SDs and SEs.

In another thread, a different approach is used: The mean variance among all subjects is calculated with the average SD being deduced from the mean variance. Cf. How to 'sum' a standard deviation?

Both lead to similar but different results and the answer in the other thread is disputed. And it also does not answer how I deduce the average SE then.

Is there a >correct< approach?

$\endgroup$
1
$\begingroup$

If I understand correctly this can be done with a mixed model, where the subjects are the random effect. In R:

> dat=data.frame(subject=rep(1:3,each=5),
               value=c(79,75,77,80,74,83,79,81,84,84,81,76,80,77,79))
> library(nlme)
> summary(lme(value~1,random=~1|subject,data=dat))

Linear mixed-effects model fit by REML
 Data: dat 
       AIC      BIC    logLik
  75.28225 77.19942 -34.64112

Random effects:
 Formula: ~1 | subject
        (Intercept) Residual
StdDev:    2.461707  2.27303

Fixed effects: value ~ 1 
               Value Std.Error DF  t-value p-value
(Intercept) 79.26667  1.537675 12 51.54968       0

Standardized Within-Group Residuals:
       Min         Q1        Med         Q3        Max 
-1.4650929 -0.8858919  0.1332504  0.8572516  1.1745552 

Number of Observations: 15
Number of Groups: 3
$\endgroup$
  • $\begingroup$ Thank you. However, I do not see where I get the average within-group SD and SE. $\endgroup$ – Toby Jan 30 at 13:31
  • $\begingroup$ The SE in your output seems to be across all three subjects. I have standard errors of 1.02, 0.87, and 0.83 for subject 1, 2, and 3, respectively. So if I want to say what standard error is to be expected for a random subject i would expect it to be somewhere around this value, logically. $\endgroup$ – Toby Jan 30 at 13:37
  • $\begingroup$ @Toby In a mixed model we separate the "within-group" variance or residual into multiple groups. In this case we get a separate SD (not standard error) for both "within-group" variances: subjects (Intercept) and the remainder (the unexplained variance). $\endgroup$ – user2974951 Jan 30 at 13:38
  • $\begingroup$ Thank you but I still don't get it. It does not seem to solve what I am intending on doing. What I want is: I have x subjects and every subject created y values. Based on that I can determine an individual SD and SE for each subject based on the variance among his or her y values. I do not want to compare the values across the subjects but uniquely within subjects. Therefore I do not care how the mean values between the subjects differ from each other. One subject can create the values {15031,15029,15032} while another can create {31,29,32} and they will have the same SD anyway. $\endgroup$ – Toby Jan 30 at 15:04
  • $\begingroup$ What I want to be able to say is what SD and what SE within one subject in average can be expected. But I do not think I may calculate the SD for each subject and determine the mean value out of it, may I? $\endgroup$ – Toby Jan 30 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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