View source: R/report.cortest.R
report.cortest | R Documentation |
This function conducts correlation tests between pairs of interval variables. It performs either Pearson or Spearman correlation tests, depending on the chosen method.
report.cortest(
varNamesX,
varNamesY,
data,
method = "pearson",
confLevel = 0.95,
language = "english"
)
varNamesX |
A vector of strings representing the names of the X variables in the data frame. |
varNamesY |
A vector of strings representing the names of the Y variables in the data frame. |
data |
A data frame or an object of class |
method |
A string indicating the method of correlation test to be conducted: |
confLevel |
A numeric value between 0 and 1 indicating the confidence level for the confidence interval of the Pearson correlation. Default is |
language |
The language used for displaying the statistics in the frequency table. This parameter accepts two values: |
The function calculates correlation coefficients, p-values, and, for Pearson method, confidence intervals if specified and applicable. For weighted survey data, confidence intervals are not calculated. Spearman correlation is available only for non-weighted data.
A matrix with rows representing each pair of variables, and columns representing: 1) variable pair, 4) p-value, 5) correlation coefficient (Pearson or Spearman, as specified), 6) 95 7) 95
Marjan Cugmas
report.cortest(varNamesX = "drat", varNamesY = c("wt", "disp", "hp"), data = mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.