powered by
Computes multivariate correlation and covariance for the variables of interest.
weighted.corr.cov.n( data, x, w = rep(1, length(data[x[1]])), corr = TRUE, na.rm = TRUE )
Data frame containing each pairwise bivariate correlation/covariance
(data frame) Data to analyse
(string vector) Variables of interest for which to compute the correlation/covariance
(string) Name of the numeric variable representing the weights
(bool) if TRUE: Computes correlation; if FALSE: Computes covariance
(bool) if TRUE: Excludes missing values before computing the correlation/covariance.
data(df_talis18) weighted.corr.cov.n(df_talis18,c("t3stake","t3team","t3stud"),"tchwgt")
Run the code above in your browser using DataLab