CCassociation
finds correlation between all the variables in data
with only numeric columns
CCassociation(
numtb,
use = "everything",
normality_test_method,
normality_test_pval,
method1 = c("auto", "pearson", "kendall", "spearman"),
methodMat1 = NULL,
methods_used
)
a data frame with all the numerical columns. This should have at least two columns
an optional character string giving a method for computing association in the presence of missing values. This must be (complete or an abbreviation of) one of the strings "everything", "all.obs", "complete.obs", "na.or.complete", or "pairwise.complete.obs". If use is "everything", NAs will propagate conceptually, i.e., a resulting value will be NA whenever one of its contributing observations is NA. If use is "all.obs", then the presence of missing observations will produce an error. If use is "complete.obs" then missing values are handled by case wise deletion (and if there are no complete cases, that gives an error). "na.or.complete" is the same unless there are no complete cases, that gives NA
method for normality test for a variable.
Values can be shapiro
for Shapiro-Wilk test or
'anderson'
for 'Anderson-Darling' test of normality or ks
for
'Kolmogorov-Smirnov'
significance level for normality tests. Default is 0.05
method for association between continuous-continuous
variables. values can be "auto", "pearson", "kendall", "spearman"
.
See details for more information.
method dataframe like methodMats from the function
association
a square data.frame which will store the type of association used between the variables. Dimension will be number of variables * number of variables.
a list of two tables with number of rows and column equal to number
of columns in numtb
:
Table containing correlation values
Table containing p-value for the correlation test
This function calls cor
function to calculate the correlation values.
The difference is that this doesn't take method as parameter, instead it
decides the methods itself using normality tests. If the variables satisfy
the assumption of Pearson correlation, then pearson correlation is calculated.
Otherwise Spearman is calculated. To learn more, check the
cor
association
for association between any type of variables,
QQassociation
for Association between Categorical variables,
CQassociation
for Association between Continuous-Categorical
variables