weighted.corr {Rrepest} | R Documentation |
Weighted Bivariate Correlation
Description
Compute weighted pearson correlation coefficient of two numeric vectors
Usage
weighted.corr(x, y, w, na.rm = TRUE)
Arguments
x |
(numeric vector) variable from where to get correlation |
y |
(numeric vector) variable from where to get correlation |
w |
(numeric vector) vector of weights |
na.rm |
(bool) True: NAs be stripped before computation proceeds |
Value
Pearson correlation coefficient
Examples
data(df_talis18)
weighted.corr(x = df_talis18$T3STAKE, y = df_talis18$T3TEAM, w = df_talis18$TCHWGT)
[Package Rrepest version 1.3.0 Index]