boot: Non parametric bootstrap for a fitted correlation.

Description Usage Arguments Value Examples

View source: R/boot.r

Description

This function performs a non parametric bootstrap for a fitted correlation. The argument should be an object returned by PC, empPC or spearmanR.

Usage

1
	boot(model, size)

Arguments

model

a correlation object as returned by functions PC, empPC or spearmanR.

size

the number of resamples

Value

model

copy of the object argument model

r

vector with correlation (r) values for every sample

theta

only for PC models: vector of fitted theta values for the Copula distribution

loss

only for PC models: vector of loss values for the fitted Copula distribution

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
#load contingency table
data(table4);

#fit a copula correlation
myOC <- PC(table4,"gauss","MH");
bs1 <- boot(myOC, size=10);
print(bs1);

#fit an empirical correlation
myEC <- empPC(table4);
bs2 <- boot(myEC);

#fit a spearman correlation
mySR <- spearmanR(table4);
bs3 <- boot(mySR);

jeroenooms/JJcorr documentation built on May 17, 2017, 6:15 p.m.