powered by
Calculates the standard deviation of a weighted sample set while propagating sample weights through the calculation.
sd_wt(x, w, na.rm = FALSE)
Vector containing the values in the set
Vector containing the weights to each value (in the same order as x the optimized growth model
x
Should NA values be removed from the set prior to calculation? TRUE/FALSE
TRUE/FALSE
The standard deviation of the weighted set of x values
# NOT RUN { # Create dummy data x <- seq(1, 10, 0.5) w <- c(seq(0.1, 1, 0.1), seq(0.9, 0.1, -0.1)) SDw <- sd_wt(x, w, na.rm = TRUE) # Run the function # }
Run the code above in your browser using DataLab