summary.formula
and summarize
(as well as
tapply
and by themselves).
smean.cl.normal
computes 3 summary variables: the sample mean and
lower and upper Gaussian confidence limits based on the t-distribution.
smean.sd
computes the mean and standard deviation.
smean.sdl
computes the mean plus or minus a constant times the
standard deviation.
smean.cl.boot
is a very fast implementation of the basic
nonparametric bootstrap for obtaining confidence limits for the
population mean without assuming normality.
These functions all delete NAs automatically.
smedian.hilow
computes the sample median and a selected pair of
outer quantiles having equal tail areas.smean.cl.normal(x, mult=qt((1+conf.int)/2,n-1), conf.int=.95, na.rm=TRUE)smean.sd(x, na.rm=TRUE)
smean.sdl(x, mult=2, na.rm=TRUE)
smean.cl.boot(x, conf.int=.95, B=1000, na.rm=TRUE, reps=FALSE)
smedian.hilow(x, conf.int=.95, na.rm=TRUE)
smean.*
, smedian.hilow
, a numeric vector
from which NAs will be removed automaticallyTRUE
unlike built-in S-Plus functions, so that by
default NA
s are automatically removedsmean.cl.normal
is the multiplier of the standard error of the
mean to use in obtaining confidence limits of the population mean
(default is appropriate quantile of the t distribution). For
smean.sdl
, mult
is thsmean.cl.normal
and smean.cl.boot
specifies the confidence
level (0-1) for interval estimation of the population mean. For
smedian.hilow
, conf.int
is the coverage probability the outer
quantiles shosmean.cl.boot
TRUE
to have smean.cl.boot
return the vector of bootstrapped
means as the reps
attribute of the returned objectsummarize
, summary.formula
set.seed(1)
x <- rnorm(100)
smean.sd(x)
smean.sdl(x)
smean.cl.normal(x)
smean.cl.boot(x)
smedian.hilow(x, conf.int=.5) # 25th and 75th percentiles
Run the code above in your browser using DataLab