update_param: compute new mean and sd from old ones with one additional...

Description Usage Arguments Value

View source: R/ocd.R

Description

compute new mean and sd from old ones with one additional observation

Usage

1
update_param(old_mean, old_sd, x_new, n_obs)

Arguments

old_mean

vector of old means

old_sd

vector of old standard deviation

x_new

new observation vector

n_obs

total number of observations (including x_new)

Value

list of two vectors: new mean and new standard deviation


wangtengyao/ocd documentation built on Oct. 4, 2020, 1:32 p.m.