The calculation of the p-value that accounts for the finite sample size uses a formula from Davison and Hinkley (1997), Bootstrap Methods and their Application, chapter 4, p. 161.
calcPvalFromBS(
testStat,
bsStat,
corrected = FALSE,
alternative = c("greater", "less")
)
a numeric, test statistic.
a numeric vector with statistic from bootstrapping.
a logical; if TRUE, calculates a p-value that accounts for the finite sample size; default FALSE.
either of "less" or "greater"; default "greater"
a scalar with the p-value