fun.testregboot | R Documentation |
Compare coverage of bootstrap confidence intervals from regression.
fun.testregboot(dists, regparam, sampsize = 10, mcsamp = 10000, B = 9999)
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 |
A matrix of coverage levels. Dimensions are distribution and confidence interval technique.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.