boot_cor: Bootstrap a correlation

View source: R/support_functions.R

boot_corR Documentation

Bootstrap a correlation

Description

Bootstrap a correlation

Usage

boot_cor(x, y, boot.reps = 1000, alpha = 0.05)

Arguments

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.

Value

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)

Examples

data <- replicate(2, rnorm(100))
boot_cor(x = data[,1], y = data[,2], boot.reps = 1000)


neyhartj/gws documentation built on Feb. 5, 2024, 12:42 a.m.