Learn R Programming

wBoot (version 1.0.3)

boot.ratio.sd.bca: BCa Bootstrap Independent-Samples Test and CI for Two Standard Deviations

Description

Obtains an independent-samples confidence interval and (optionally) performs an independent-samples hypothesis test for the ratio of two population standard deviations, using the BCa bootstrap method.

Usage

boot.ratio.sd.bca(x, y, stacked = TRUE, variable = NULL, null.hyp = NULL,
                  alternative = c("two.sided", "less", "greater"),
                  conf.level = 0.95, type = NULL, R = 9999)

Arguments

x
a numeric vector of observations of the variable (stacked case) or a numeric vector of data values representing the first of the two samples (unstacked case).
y
a vector of corresponding population identifiers (stacked case) or a numeric vector of data values representing the second of the two samples (unstacked case).
stacked
a logical value (default TRUE) indicating whether the data are stacked.
variable
an optional string that gives the name of the variable under consideration; ignored if stacked is TRUE.
null.hyp
the null-hypothesis value; if omitted, no hypothesis test is performed.
alternative
a character string specifying the alternative hypothesis; must be one of "two.sided" (default), "greater", or "less".
conf.level
the confidence level (between 0 and 1); default is 0.95.
type
a character string specifying the type of CI; if user supplied, must be one of "two-sided", "upper-bound", or "lower-bound"; defaults to "two-sided" if alternative is "two.sided", "upper-bound" if alternative is "less", and "lower-bound" if alternative
R
the number of bootstrap replications; default is 9999.

Value

  • A list with class "boot.two" containing the following components:
  • Stackeda logical indicating whether the data are stacked (TRUE) or not (FALSE).
  • Boot.valuesthe point estimates for the ratio of the standard deviations obtained from the bootstrap.
  • Confidence.limitsthe confidence limit(s) for the confidence interval.
  • Parameterthe parameter under consideration, here standard deviation.
  • Headerthe main title for the output.
  • Variablethe name of the variable under consideration or NULL
  • Pop.1the first population.
  • Pop.2the second population.
  • n.1the sample size for the first population.
  • n.2the sample size for the second population.
  • Statisticthe name of the statistic, here ratio.sd.
  • Observed.1the observed point estimate for the standard deviation of the first population.
  • Observed.2the observed point estimate for the standard deviation of the second population.
  • Observedthe observed point estimate for the ratio of the two standard deviations.
  • Replicationsthe number of bootstrap replications.
  • Meanthe mean of the bootstrap values.
  • SEthe standard deviation of the bootstrap values.
  • Biasthe difference between the mean of the bootstrap values and the observed value.
  • Percent.biasthe percentage bias: 100*|Bias/Observed|.
  • Nullthe null-hypothesis value or NULL.
  • Alternativethe alternative hypothesis or NULL.
  • P.valuethe P-value or a statement like P < 0.001 or NULL.
  • p.valuethe P-value or NULL.
  • Levelthe confidence level.
  • Typethe type of confidence interval.
  • Confidence.intervalthe confidence interval.

concept

  • Bootstrap
  • BCa bootstrap
  • Independent-samples inferences
  • Confidence interval
  • Hypothesis test
  • Inferences for two standard deviations

Examples

Run this code
# Elmendorf tear strengths, in grams, for independent samples of
# Brand A and Brand B vinyl floor coverings.
data("elmendorf")
str(elmendorf)
attach(elmendorf)
# Note that the data are stacked.

# 90% confidence interval for the ratio of the population standard
# deviations of tear strength for Brands A and B.
boot.ratio.sd.bca(STRENGTH, BRAND, conf.level = 0.90)

# 95% (default) confidence interval for the ratio of the population
# standard deviations of tear strength for Brands A and B, and a
# two-tailed hypothesis test with null hypothesis 1 (i.e., the
# population standard deviations are equal).
boot.ratio.sd.bca(STRENGTH, BRAND, null.hyp = 1)

detach(elmendorf)  # clean up

Run the code above in your browser using DataLab