powered by
Compute weighted standard deviation or standard error for a variable or for all variables of a data frame.
wtd_sd(x, weights = NULL)wtd_se(x, weights = NULL)
wtd_se(x, weights = NULL)
(Numeric) vector or a data frame.
Numeric vector of weights.
The weighted standard deviation or standard error of x, or for each variable if x is a data frame.
x
# NOT RUN { wtd_sd(rnorm(n = 100, mean = 3), runif(n = 100)) data(efc) wtd_sd(efc[, 1:3], runif(n = nrow(efc))) wtd_se(efc[, 1:3], runif(n = nrow(efc))) # }
Run the code above in your browser using DataLab