Rcmdr
data(iris)
data(BP)
t.test
lm
library(lsmeans)
aov
library(multcomp)
\[ \large SE(\bar{y_i}) = \sqrt\frac{\sigma^2}{n} \]
Where, n is the number of observation for the i-th Group.
\[ \large \hat\sigma^2 = MSE \]
\[ \large SE(\bar{y_i}) = \sqrt\frac{MSE}{n} \]
fm <- lm(SBP ~ Group, data=BP) summary(fm) sigma <- summary(fm)$sigma anova(fm) MSE <- anova(fm)[2,3] n <- sum(BP$Group=='A') SE <- sqrt(MSE/n)