sd_update: Incremental Standard deviation calculation

Description Usage Arguments Value

View source: R/stat.R

Description

Online algorithm for updating a given std when a new value is added http://stats.stackexchange.com/questions/24878/computation-of-new-standard-deviation-using-old-standard-deviation-after-change Algorithms for calculating variance : http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance TODO: check for numerical stability

Usage

1
sd_update(stdev, avg, cnt, val, na.rm = TRUE)

Arguments

stdev

The current standard deviation

avg

The current average value

cnt

The number of elements before the new value

val

The new value

na.rm

Whether to remove NA values

Value

The new standard deviation


henfiber/later documentation built on May 20, 2019, 6:46 p.m.