View source: R/dist_ktab_cerUB.R
"The mixed-variables coefficient of distance generalizes Gower's general
coefficient of distance to allow the treatment of various statistical types of
variables when calculating distances. This is especially important when
measuring functional diversity. Indeed, most of the indices that measure
functional diversity depend on variables (traits) that have various
statistical types (e.g. circular, fuzzy, ordinal) and that go through a matrix
of distances among species." (From dist.ktab
) This is a
modified version that allows for 'exception values' in ordinal variables and
weighting the class-wise data sets differently.
1 2 3 | dist.ktab_cerUB(ktab_data, variable_classes, option = c("scaledBYrange",
"scaledBYsd", "noscale"), scann = FALSE, tol = 1e-08,
is_protocol2b = FALSE, dist.excep = 2, weight = NULL)
|
ktab_data |
Object of class ktab (created with
|
variable_classes |
Vector that provide the type of each table in x. The possible types are "Q" (quantitative), "O" (ordinal), "N" (nominal), "D" (dichotomous), "F" (fuzzy, or expressed as a proportion), "B" (multichoice nominal variables, coded by binary columns), "C" (circular), "CODA" (compositional). Values in type must be in the same order as in x. |
option, scann, tol |
Arguments of |
is_protocol2b |
Logical, whether the protocol 2b is being applied. Protocol 2b uses 'neighbour interexchange' to calculate distance in ordinal variables. |
dist.excep |
The distance from any value to an exception value, that should be previously transform into NA. |
weight |
Numeric, vector with the weights attributed to every data frame included in ktab_data. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.