View source: R/support_functions.R
boot_cor | R Documentation |
Bootstrap a correlation
boot_cor(x, y, boot.reps = 1000, alpha = 0.05)
boot.reps |
An integer of how many bootstrapping replications to perform. |
data |
A two-column matrix of data to correlate |
prob |
A floating point that specifies the percentile confidence interval to report from bootstrapping. Default is 0.95. |
A list containing the correlation coefficient (r), the standard deviation of bootstrapping correlation coefficients (r.sd.hat), and the confidence interval surrounding the mean (CI)
data <- replicate(2, rnorm(100))
boot_cor(x = data[,1], y = data[,2], boot.reps = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.