Description Usage Arguments Value Author(s) Examples
This function takes as arguments the number of bootstrap replicates n
,
x
and y
which are two numerical vectors / data, then bootstrap from x ,y
, and calculate the correlation of these data for each resampling n times.
If plot
is chosen to be TRUE, then the function plots the histogram, as well as the 95
estimates.
1 | bootstrap.correlation(n=200, x , y, plot = FALSE)
|
n |
is a positive integer that specifies how many bootstrap replicates should be used for estimation. |
x |
is a vector of numeric values to be used with y to estimate correlation and bootstrap estimates. |
y |
is a vector of numeric values to be used with x to estimate correlation and bootstrap estimates. y has to be of the same length as x. |
plot |
is a boolean value that specifies whether a plot should be created or not |
Returns a list containing: the estimated correlation of the two given vectors, the bootstrap estimated correlation of the data, as well as the standard error, bias and the 95 percent confidence interval.
Nguyen Khanh Le Ho & Emil H. Andersen
Department of Mathematics and Computer Science (IMADA)
University of Southern Denmark, Denmark
emila14@student.sdu.dk
ngho14@student.sdu.dk
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.