View source: R/pv_rrepest_correlation.R View source: R/weighted_multivariate_corr_cov.R
weighted.corr.cov.n | R Documentation |
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 |
(data frame) Data to analyse |
x |
(string vector) Variables of interest for which to compute the correlation/covariance |
w |
(string) Name of the numeric variable representing the weights |
corr |
(bool) if TRUE: Computes correlation; if FALSE: Computes covariance |
na.rm |
(bool) if TRUE: Excludes missing values before computing the correlation/covariance. |
Data frame containing each pairwise bivariate correlation/covariance
data(df_talis18)
weighted.corr.cov.n(df_talis18,c("t3stake","t3team","t3stud"),"tchwgt")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.