paired_bootstrap_CI | R Documentation |
This function will create a bootstrap confidence interval for a paired mean difference or paired median difference between two quantitative variables for matched pairs data.
paired_bootstrap_CI( data, summary_measure = "mean", which_first = 1, confidence_level = 0.95, number_repetitions = 100 )
data |
Vector of differences or a two- or three-column data frame with values for each group in last two columns. |
summary_measure |
Name of summary measure to return from simulations.
Allowed values are
|
which_first |
Which column is first in order of subtraction?
|
confidence_level |
Confidence level for interval in decimal form.
Defaults to |
number_repetitions |
Number of bootstrapped resamples. |
Returns plot of distribution of bootstrapped statistics, with values as or more extreme than percentile confidence interval range highlighted, and reports confidence interval as subtitle on plot.
set.seed(117) x <- rnorm(25) y <- x + 1 + rnorm(25, 0, 1.8) data <- data.frame(x, y) paired_bootstrap_CI(data, which_first = 1, confidence_level = 0.9, number_repetitions = 1000 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.