View source: R/hier.boot.mean.R
hier.boot.mean | R Documentation |
This function applies a non-parametric bootstrapping procedure suited to hierarchically structured data, sometimes called a multi-stage bootstrap. A study where random sites are selected, then multiple sub-plots are surveyed at each site would be a hierarchical example. Here, resampling is done first at the top level, then at the sub-level measurements associated with that top level stratum. There is some debate about whether resampling at each level should be done with or without replacement. Here, we sample with replacement at both levels.
hier.boot.mean(x, strata, data, B = 500, ci = 0.95, plot = TRUE)
x |
Name of column (in quotes) containing numeric sub-level measurements. |
strata |
Name of column (in quotes) containing factors that identify top-level strata. |
data |
Data.frame containing the above columns. |
B |
Number of bootstrap replicates. Default is 500. |
ci |
Level of confidence interval (CI). Default is 95% CI. |
plot |
Logical, should a histogram of the bootstrap replicates and CI be plotted. Default is TRUE. |
A named numeric vector giving the observed mean and lower and upper confidence limits.
Jason D. Carlisle, University of Wyoming
boot.mean
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.