sdrobnorm {stepR} | R Documentation |
Robust estimation of the standard deviation of Gaussian data.
sdrobnorm(x, p = c(0.25, 0.75), lag = 1,
supressWarningNA = FALSE, supressWarningResultNA = FALSE)
x |
a vector of numerical observations. |
p |
vector of two distinct probabilities |
lag |
a single integer giving the lag of the difference used, see |
supressWarningNA |
a single logical, if |
supressWarningResultNA |
a single logical, if |
Compares the difference between the estimated sample quantile corresponding to p
after taking (lag
ged) differences) with the corresponding theoretical quantiles of Gaussian white noise to determine the standard deviation under a Gaussian assumption. If the data contain (few) jumps, this will (on average) be a slight overestimate of the true standard deviation.
This estimator has been inspired by (1.7) in (Davies and Kovac, 2001).
Returns the estimate of the sample's standard deviation, i.e. a single non-negative numeric, NA
if length(x) < lag + 2
.
Davies, P. L., Kovac, A. (2001) Local extremes, runs, strings and multiresolution. The Annals of Statistics 29, 1–65.
sd
, diff
, parametricFamily, family
# simulate data sample
y <- rnorm(100, c(rep(1, 50), rep(10, 50)), 2)
# estimate standard deviation
sdrobnorm(y)