weighted.var {Rrepest} | R Documentation |
Calculate the weighted variance numeric vector
weighted.var(x, w, na.rm = TRUE)
x |
(numeric vector) variable to analyze |
w |
(numeric vector) vector of weights |
na.rm |
(bool) if TRUE remove missing values. |
Scalar with Variance or Standard Deviation
data(df_talis18)
weighted.var(df_talis18$TT3G02, df_talis18$TRWGT1)