View source: R/dataFunctions.R
sdDiff | R Documentation |
sdDiff is a function based on the difference operator (or difference order for HALL method) estimating the time-series standard deviation. The estimation works for time-series generated by Gaussian random variables with constant standard deviation and multiple changes in mean. Three estimators are available:
HALL
: the so-called HALL-estimator of order 3. For more details see: (1990) Asymptotically optimal difference-based estimation of variance in nonparametric regression. Authors: Hall, Peter and Kay, JW and Titterinton, DM. Biometrika, pages 521–528
MAD
: the median absolute deviation estimator computed on diff(x)/sqrt(2)
with x the vector of datapoints
SD
: the standard deviation estimator (function sd) computed on diff(x)/sqrt(2)
with x the vector of datapoints
sdDiff(x, method = "HALL")
x |
vector of datapoints |
method |
Three available methods: |
a value equal to the estimated standard deviation
data <- dataGenerator(300, seq(0.1,1,0.1), sample(10), sigma = 2)
sdDiff(data, method = "HALL")
sdDiff(data, method = "MAD")
sdDiff(data, method = "SD")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.