Description Usage Arguments Value See Also Examples
Given a numeric vector (x
), the corresponding vector of weights (weights
) and the weighted mean of x
(weighted_mean
), calculate the weighted standard deviation of x
.
1 | sdWeighted(x, weights, weighted_mean)
|
x |
The numeric vector for which the weighted standard deviation is to be calculated. |
weights |
A vector of the same length as |
weighted_mean |
The weighted mean of |
A numeric vector of length 1 giving the weightyed mean of x
.
1 2 3 4 | x <- rnorm(10)
wt <- runif(10)
mn <- weighted.mean(x, wt)
std <- sdWeighted(x, wt, mn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.