powered by
Tests whether a robust location measure (median, Huber Psi) differs from a null value and reports a 95% confidence interval based on percentile bootstrap.
onesampb(x, est = "onestep", nboot = 2000, nv = 0, alpha = 0.05, ...)
Returns an object of class "onesampb" containing:
"onesampb"
95% confidence interval
robust location sample estimate
p-value
number of effective observations
function call
a numeric vector.
robust estimator to be used ("onestep", "mom", or "median").
"onestep"
"mom"
"median"
number of bootstrap samples.
value under H0.
alpha level.
currently ignored.
Wilcox, R. (2017). Introduction to Robust Estimation and Hypothesis Testing (4th ed.). Elsevier.
t1way
set.seed(123) x <- rnorm(30) onesampb(x, nboot = 100) ## H0: Psi = 0 set.seed(123) x <- rlnorm(30) onesampb(x, est = "median", nv = 1) ## H0: median = 1
Run the code above in your browser using DataLab