BB: Bayesian bootstrap

Description Usage Arguments Value Examples

View source: R/Module1_code.R

Description

Bayesian bootstrap

Usage

1
BB(data, FUN, ..., B = 1000)

Arguments

data

the original sample, as a vector, matrix or dataframe

FUN

a function to calculate an estimate of the parameter of interest

B

the number of bootstrap replications

Value

a list consisting of

replicates

a matrix containing an estimate for the parameter of interest of each bootstrap replicate

se

the standard error(s) of the parameter estimates

Examples

1
2
3
X <- rnorm(100, 4, 2)
BB_mean <- BB(X, weighted.mean, B=10000)
BB_mean$se

EllaKaye/Module1 documentation built on May 6, 2019, 3:25 p.m.