Description Usage Arguments Value Author(s) See Also Examples
Computes the values of (or the distance based on) the simple matching coefficient or Cohen's Kappa, respectively, for each pair of rows of a matrix.
1 2 |
x |
a matrix consisting of integers between 1 and n.cat,
where n.cat is the number of levels the variables in |
dist |
should the distance based on the simple matching coefficient or Cohen's Kappa, respectively,
be computed? Note that, e.g., |
A matrix with nrow(x)
columns and rows containing the distances or similarities.
Holger Schwender, holger.schwender@udo.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# Generate a data set consisting of 10 rows and 200 columns,
# where the values are randomly drawn from the integers 1, 2, and 3.
mat <- matrix(sample(3, 2000, TRUE), 10)
# For each pair of row, the value of the simple matching coefficient
# can be obtained by
smc(mat)
# and the distance based on the SMC by
smc(mat, dist = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.