bootPaired {CarletonStats} | R Documentation |
Perform a bootstrap of two paired variables.
bootPaired(x, ...) ## Default S3 method: bootPaired(x, y, conf.level = 0.95, B = 10000, plot.hist = TRUE, plot.qq = FALSE, legend.loc = "topright", x.name = deparse(substitute(x)), y.name = deparse(substitute(y)), ...) ## S3 method for class 'formula' bootPaired(formula, data, subset, ...)
x |
a numeric vector. |
... |
further arguments to be passed to or from methods. |
y |
a numeric vector. |
conf.level |
confidence level for the bootstrap percentile interval. |
B |
number of resamples (positive integer greater than 2). |
plot.hist |
logical. If |
plot.qq |
logical. If |
legend.loc |
location for the legend on the histogram. Options are
|
x.name |
Label for variable x |
y.name |
Label for variable y |
formula |
a formula |
data |
a data frame that contains the variables given in the formula. |
subset |
an optional expression indicating what observations to use. |
The command will compute the difference of x
and y
and
bootstrap the difference. The mean and standard error of the bootstrap
distribution will be printed as well as a bootstrap percentile interval.
Observations with missing values are removed.
The command invisibly returns a vector with the replicates of the statistic being bootstrapped.
default
: Perform a bootstrap of two paired variables.
formula
: Perform a bootstrap of two paired variables.
Laura Chihara
Tim Hesterberg's website http://www.timhesterberg.net/bootstrap
#Bootstrap the mean difference of fat content in vanilla and chocolate ice #cream. Data are paired becaues ice cream from the same manufacturer will #have similar content. Icecream bootPaired(ChocFat ~ VanillaFat, data = Icecream) bootPaired(Icecream$VanillaFat, Icecream$ChocFat)