wtdVar {eatTools} | R Documentation |
This functions works quite equally as the wtd.var
function
from the Hmisc
package.
wtdVar(x , weights , na.rm = FALSE)
x |
numeric vector |
weights |
a numeric vector of non-negative weights |
na.rm |
set to |
a scalar
Benjamin Becker
x <- c(50, 1, 25) w <- c(1, 4, 1) wtdVar(x, w)