cor.boot.ci {npsm} | R Documentation |
Confidence interval for a correlation based on a bootstrap.
Description
Returns a bootstrap confidence interval for any of the correlations available in the base R
cor
function.
Usage
cor.boot.ci(x, y, method = "spearman", conf = 0.95, nbs = 3000)
Arguments
x |
n by 1 vector |
y |
n by 1 vector |
method |
Which correlation to use. Argument passed to |
conf |
Confidence level. |
nbs |
number of bootstrap samples to base CI on. |
Details
Obtains a percentile bootstrap confidence interval.
The bootstrap samples are obtained via the function boot
.
Value
A confidence interval.
Author(s)
John Kloke, Joseph McKean
See Also
See Also as cor
Examples
library(boot)
with(bb2010,cor.boot.ci(ave,hr))
[Package npsm version 2.0.0 Index]