fun.testboot: Compare coverage of bootstrap confidence intervals.

View source: R/testboot.R

fun.testbootR Documentation

Compare coverage of bootstrap confidence intervals.

Description

Compare coverage of bootstrap confidence intervals.

Usage

fun.testboot(
  fcn,
  sampsize = 10,
  nsamp = NA,
  mcsamp = 10000,
  B = 9999,
  dists = c("rnorm", "rcauchy"),
  truem = NULL,
  alpha = 0.05
)

Arguments

fcn

function to be bootstrapped.

sampsize

Number of observations per sample; defaults to 10

nsamp

Deprecated version of mcsamp.

mcsamp

Number of Monte Carlo samples.

B

Bootstrap size

dists

vector of names of random number generators for sample. Defaults to normal and Cauchy. This fails for a single distribution.

truem

True parameter value; should be of length 1 or length of distribution vector.

alpha

1-confidence level.

Value

A list with two components. The first is a two-dimensional array of average interval lengths. The second is coverage levels. Dimensions of both are distribution and confidence interval technique.

Examples

fun.testboot(function(x,indices) return(c(mean(x[indices]),1)),mcsamp=100,B=999)


kolassa-dev/NonparametricHeuristic documentation built on Nov. 14, 2022, 11:25 p.m.