a_amean {COINr} | R Documentation |
The vector of weights w
is relative since the formula is:
a_amean(x, w)
x |
A numeric vector. |
w |
A vector of numeric weights of the same length as |
y = 1(\sum w) \sum wx
If x
contains NA
s, these x
values and the corresponding w
values are removed before applying the
formula above.
The weighted mean as a scalar value
x <- c(1:10)
w <- c(10:1)
a_amean(x,w)