bootstrap.correlation: Bootstrap Estimation of Correlation

Description Usage Arguments Value Author(s) Examples

Description

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.

Usage

1
bootstrap.correlation(n=200, x , y, plot = FALSE)

Arguments

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

Value

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.

Author(s)

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

Examples

1

Chaiji/LemilExamST522 documentation built on May 6, 2019, 9:55 a.m.