View source: R/pv_rrepest_correlation.R View source: R/weighted_covariance.R
weighted.cov | R Documentation |
Computes the weighted covariance coefficient of two numeric vectors.
weighted.cov(x, y, w, na.rm = TRUE)
x |
(numeric vector) Variable of interest x for computing the covariance |
y |
(numeric vector) Variable of interest y for computing the covariance |
w |
(numeric vector) Vector with the weights |
na.rm |
(bool) if TRUE: Excludes missing values before computing the covariance |
Scalar containing the covariance
data(df_talis18)
weighted.cov(x = df_talis18$t3stake, y = df_talis18$t3team, w = df_talis18$tchwgt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.