what is the R code to calculated a mean and standard deviation of multiple mean and standard deviations? each has its own number of items...
I tried to search online and in this forum but there was no straight answer...thank you!
what is the R code to calculated a mean and standard deviation of multiple mean and standard deviations? each has its own number of items...
I tried to search online and in this forum but there was no straight answer...thank you!
shghm
On
If you have several means (lets call them a and b) and their corresponding standard deviations (lets call them saand sb) and you calculated the mean of means (via mean(c(a,b))) then you need to do "error propagation" for the corresponding standard deviation. In this case the new standard deviation sab would be: sab=1/2*sqrt(sa^2+sb^2)
Copyright © 2021 Jogjafile Inc.
Would you be able to provide us with an example?
The R code to calculate a mean is
So for example if you had a set of numbers
You could nest
mean()if you'd like