Learn R Programming

stepR (version 1.0-1)

sdrobnorm: Robust standard deviation estimate

Description

Robust estimation of the standard deviation of Gaussian data.

Usage

sdrobnorm(x, p = c(0.25, 0.75), lag = 1)

Arguments

x
a vector of numerical observations
p
vector of two distinct probabilities
lag
the lag of the difference used, see diff

Value

  • Returns the estimate of the sample's standard deviation.

Details

Compares the difference between the estimated sample quantile corresponding to p after taking (lagged) 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.

References

Davies, P.L., Kovac, A. (2001). Local extremes, runs, strings and multiresolution. The Annals of Statistics 29, 1-65.

See Also

sd, diff, family

Examples

Run this code
# simulate data sample
y <- rnorm(100, c(rep(1, 50), rep(10, 50)), 2)
# estimate standard deviation
sdrobnorm(y)

Run the code above in your browser using DataLab