fun.testregboot: Compare coverage of bootstrap confidence intervals from...

View source: R/common.R

fun.testregbootR Documentation

Compare coverage of bootstrap confidence intervals from regression.

Description

Compare coverage of bootstrap confidence intervals from regression.

Usage

fun.testregboot(dists, regparam, sampsize = 10, mcsamp = 10000, B = 9999)

Arguments

dists

vector of names of random number generators for sample. Defaults to normal.

regparam

function to pass to the bootstrapping tool

sampsize

Number of observations per sample; defaults to 10

mcsamp

Number of Monte Carlo samples.

B

Bootstrap size

Value

A matrix of coverage levels. Dimensions are distribution and confidence interval technique.

Examples

regparam<-function(data,indices,fittedv,residuals){
   y<-fittedv+residuals[indices]
   return(summary(lm(y~data[,1]))$coefficients[2,1:2]^(1:2))}
fun.testregboot(c("rnorm","rcauchy","rexp"),regparam,mcsamp=20,B=99)


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