darma | R Documentation |
Computes bivariate association measures between a response and predictor variables, producing a summary looking like a regression analysis.
darma(y, x, weights=rep(1,length(y)), target=1, twocont="kendall", nperm=NULL, distrib="asympt", dec=c(1,3,3))
y |
the response variable |
x |
the predictor variables |
weights |
an optional numeric vector of weights (by default, a vector of 1 for uniform weights) |
target |
rank or name of the category of interest when y is categorical |
twocont |
character. The type of measure of correlation measure to use between two continuous variables : "pearson", "spearman" or "kendall" (default). |
nperm |
numeric. Number of permutations for the permutation test of independence. If NULL (default), no permutation test is performed. |
distrib |
the null distribution of permutation test of independence can be approximated by its asymptotic distribution ( |
dec |
vector of 3 integers for number of decimals. The first value if for percents or medians, the second for association measures, the third for permutation p-values. Default is c(1,3,3). |
The function computes association measures (phi, correlation coefficient, Kendall's correlation) between the variable of interest and the other variables. It can also compute the p-values permutation tests.
A data frame
Nicolas Robette
assoc.yx
, assoc.twocat
, assoc.twocont
, assoc.catcont
, condesc
, catdesc
data(iris) iris2 = iris iris2$Species = factor(iris$Species == "versicolor") darma(iris2$Species, iris2[,1:4], target=2, nperm=100)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.