weighted.corr.cov.n {Rrepest} | R Documentation |
Multivariate Correlation and Covariance
Description
Multivariate Correlation and Covariance
Usage
weighted.corr.cov.n(
data,
x,
w = rep(1, length(data[x[1]])),
corr = TRUE,
na.rm = TRUE
)
Arguments
data |
(dataframe) data to analyze |
x |
(vector string) variables names from where to get correlation/covariance |
w |
(string) weight name |
corr |
(bool) True: get correlation. False: get covariance |
na.rm |
(bool) True: NAs be stripped before computation proceeds |
Value
Dataframe containing 2 Choose length(x) columns with each bivariate correlation/covariance
Examples
data(df_talis18)
weighted.corr.cov.n(df_talis18,c("T3STAKE","T3TEAM","T3STUD"),"TCHWGT")
[Package Rrepest version 1.3.0 Index]