# # EPage 140 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- mean.and.sd = function(x){ av = mean(x) sdev = sd(x) n = length(x) c(mean=av, SD=sdev, ci=av + qt( c(0.025,0.975), n-1 ) * sdev/sqrt(n)) }