
Last chance! 50% off unlimited learning
Sale ends in
MeanDiffCI(x, ...)
## S3 method for class 'default':
MeanDiffCI(x, y, method = c("classic", "norm", "basic", "stud", "perc", "bca"),
conf.level = 0.95, na.rm = FALSE, R = 999, ...)
## S3 method for class 'formula':
MeanDiffCI(formula, data, subset, na.action, ...)
"classic"
, "norm"
, "basic"
, "stud"
, "perc"
, "bca"
.
lhs ~ rhs
where lhs
is a numeric variable giving the data values and rhs
a factor with two levels giving the corresponding groups.model.frame
) containing the variables in the formula formula
.
By default the variables are taken from environment(formula)
NAs
. Defaults to getOption("na.action")
.t.test
.
The bootstrap intervals are strongly based on the example in boot
.MeanCI
, VarCI
, MedianCI
, boot.ci
x <- d.pizza$price[d.pizza$driver=="Carter"]
y <- d.pizza$price[d.pizza$driver=="Miller"]
MeanDiffCI(x, y, na.rm=TRUE)
MeanDiffCI(x, y, conf.level=0.99, na.rm=TRUE)
# the different types of bootstrap confints
MeanDiffCI(x, y, method="norm", na.rm=TRUE)
MeanDiffCI(x, y, method="basic", na.rm=TRUE)
# MeanDiffCI(x, y, method="stud", na.rm=TRUE)
MeanDiffCI(x, y, method="perc", na.rm=TRUE)
MeanDiffCI(x, y, method="bca", na.rm=TRUE)
# the formula interface
MeanDiffCI(price ~ driver, data=d.pizza, subset=driver %in% c("Carter","Miller"))
Run the code above in your browser using DataLab