corr_fun | R Documentation |
Compute correlation type analysis on two mixed classes columns of a given dataframe. The dataframe is allowed to have columns of these four classes: integer, numeric, factor and character. The character column is considered as categorical variable.
corr_fun(
df,
nx,
ny,
p.value = 0.05,
verbose = TRUE,
num.s = 1000,
rk = F,
comp = c("greater", "less"),
alternative = c("two.sided", "less", "greater"),
cor.nn = c("pearson", "mic", "dcor", "pps"),
cor.nc = c("lm", "pps"),
cor.cc = c("cramersV", "uncoef", "pps"),
lm.args = list(),
pearson.args = list(),
dcor.args = list(),
mic.args = list(),
pps.args = list(),
cramersV.args = list(),
uncoef.args = list(),
...
)
df |
\[ |
nx |
\[ |
ny |
\[ |
p.value |
\[ |
verbose |
\[ |
num.s |
\[ |
rk |
\[ |
comp |
\[ |
alternative |
\[ |
cor.nn |
\[ |
cor.nc |
\[ |
cor.cc |
\[ |
lm.args |
\[ |
pearson.args |
\[ |
dcor.args |
\[ |
mic.args |
\[ |
pps.args |
\[ |
cramersV.args |
\[ |
uncoef.args |
\[ |
... |
Additional arguments (TODO). |
list with all statistical results.
- All statistical tests are controlled by the confidence internal of
p.value param. If the statistical tests do not obtain a significance greater/less
than p.value the value of variable 'isig' will be 'FALSE'.
- There is no statistical significance test for the pps algorithm. By default 'isig' is TRUE.
- If any errors occur during operations by default the association measure('infer.value') will be 'NA'.
- integer/numeric pair
Pearson Correlation using cor
function. The
value lies between -1 and 1.
- integer/numeric pair
Distance Correlation using dcorT.test
function. The
value lies between 0 and 1.
- integer/numeric pair
Maximal Information Coefficient using mine
function. The
value lies between 0 and 1.
- integer/numeric pair
Predictive Power Score using score
function. The
value lies between 0 and 1.
- integer/numeric - factor/categorical pair
correlation coefficient or
squared root of R^2 coefficient of linear regression of integer/numeric
variable over factor/categorical variable using lm
function. The value
lies between 0 and 1.
- integer/numeric - factor/categorical pair
Predictive Power Score using score
function. The
value lies between 0 and 1.
- factor/categorical pair
Cramer's V value is
computed based on chisq test and using cramersV
function. The value lies
between 0 and 1.
- factor/categorical pair
Uncertainty coefficient using UncertCoef
function. The
value lies between 0 and 1.
- factor/categorical pair
Predictive Power Score using score
function. The
value lies between 0 and 1.
Igor D.S. Siciliani
KS Srikanth,sidekicks,cor2, 2020. URL https://github.com/talegari/sidekicks/.
Paul van der Laken, ppsr,2021. URL https://github.com/paulvanderlaken/ppsr.
## Not run:
corr_fun(iris, nx = "Sepal.Length", ny = "Sepal.Width", cor.nn = "dcor")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.