Description Usage Arguments Value References Examples
On page 311 of HMC (2019), a bootstrap test for a one sample location problem based on the sample mean is presented. For the function, boottestonemed, the sample median is used for the test statistic. The hypotheses tested, are:H 0 : θ = θ 0 versus H a : θ > θ 0 where θ 0 is spectified, (an input value of the function). The bootstrapped p-value is returned.
| 1 | boottestonemed(sample, theta0, b)
 | 
| sample | a vector, is the sample | 
| theta0 | a number, the null value of the mean | 
| b | an integer, the number of bootstrap resamples | 
a list with origtest, pvalue, and teststatall
originaltest is the median of the sample
pvalue is the bootstrap p-value
teststatall contains the bootstrap test median
Hogg, R. McKean, J. Craig, A. (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson.
| 1 2 3 4 | sample <- c(4, 3, 2, 9)
theta0 <- .05
b <- 5
boottestonemed(sample, theta0, b)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.